LittleStain's Recent Forum Activity

  • As this manual entry states, asjson is a common expresion..

    Many objects have it..

    https://www.scirra.com/manual/133/common-expressions

    The sprite-object itself has an asjson expresion and load from json action, that's why I asked my previous question..

  • What do you mean by ONE OBJECT's data?

    Which data would this be and how are you tracking this data right now?

  • You do know what instance variables are?

    I believe using those would simplify what you are trying to do..

    You probaly wouldn't even need enemypath1 enemypath2 and enemypath3, if they are izn a sense the same object, for 1 2 and 3 could also be defined by a seperate instance variable..

  • if you change it to

    set text to str(var)&var1&var2

    it also works..

    a string should start with a string and not a number..

  • That should not be a big issue..

    Instead of uid, in this case I would give the enemypath an instance variable "number" and the sprite an instance variable "destination"..

    Then you could just set the sprites instance variable to the destination enemypath variable..

    sprite on pathfinding arrived

    sprite add 1 to destination

    (subevent)

    system pick enemypath where enemypath.number = sprite.destination

    sprite find path to enemypath.x,enemypath.y

    or you could set destination to choose(1,2,3) to pick a random enemypath to go to..

    etcetera..

  • Yes I know that one

    So

    Object(No Need For UID Here) - Find path to Object(Need UID here)

    The picking of the object is done in the event and conditions, not in the actions..

    You can't reference another object of the same type in the action, but if you explain what it is exactly what you are trying to do, a solution can be found..

    You could for example use local variables to put the x and y of the desired object's position in..

  • You can pick the object by UID in the event..

    object pick by uid - find path to object.x,object.y

    that way you reference the right object in the event and only that object will be used for the coordinates..

  • LittleStain try this one Test.capx

    Yeah, I noticed when I tried to create my example..

    I guess first setting them up for destruction and destroying them after would work better

    Haha, forgive me my snail-like speed..

  • Can't open the capx, because you are using plugins I don't use, but like I said, the event I posted should work..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Something like that, or exactly that?

    For this event should work..

    You shared a .caproj and not a .capx, so I can't see..

  • Something like this?

    on button clicked

    --repeat 20 times

    --pick random instance of gass

    gass destroy

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies