AlexmosuTSP's Forum Posts

  • Oh yeah if the event trigger and the object affected by the event are on the same layout everything is ok.

    saludos

  • Still don't understand, if a click is the trigger , why does it matter if the text to be changed is on layout 1 or layout 2, as long as both sahre the same events sheet ?

    saludos

  • But you can still have 2 layouts share an event sheet, and events work on both layouts just fine.

    The problem only appears when an object on one layout is the trigger and an object on another layout is affected by the action triggered.

    saludos

  • Oh, I will try that.

    Why is it that an event triggered in a layout can't perform an action that changes an object on a different layout ?

    Thanks

    saludos

  • Hi, so I have 2 layouts, and one has a button on it and the second one has a text object on it.

    I have an event that says "on click" of the button, "go to layout 2" and "set texto bject's text to 12345"

    It goes to the layout, but the text never changes.

    If I put the text object on the same layout as the button, it does work.

    What am I missing ? It seems pretty straight forward, but...

    Thanks

    saludos

  • oh I understand, so at runtime, the UIDs don't change, I mean once the game starts.

    The example of destroying a rocket's exhaust sprite, checking if an instance variable is the same as the Rocket's uid, to make sure the exhaust destroyed is only the one belonging to that rocket, is supposed to work then, no ?

    scirra.com/forum/c2-destroy-object-problem_topic45999.html

    Is that a good implementation, in my answer ? Or will it fail ?

    saludos :D

  • Newt is right, it's deliberate that you can't see UIDs, because they're unreliable. If you see an object has a UID of 5, then you insert another object, the previous object's UID could change to 6. Then your events are broken. So it's best not to show them!

    WOW...just a second there, you mean if an object is spawned and gets UID 3, and then another instance of that object, already spawned, is destroyed, the obect's UID changes from 3 to...2 ?

    Or how does it change? And why ?

    saludos :D

  • Don't you prefer destroying the bullet on impact ?

    And to set the speed back to 10 maybe you should add

    "character.x NOT <= BULLET.X-5 set bullet speed to 10"

    ...after your events

    saludos :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks David

    saludos :D <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Just a random negative number so it never gets confused with 0 or positive UIDs that will spawn, maybe in this situation no more than 1 or 2 at a time, but who knows in other projects.

    saludos :D

  • No you can't but you can put a condition in case of impact.

    Make an instannce variable to Exhaust, called "spawner".

    Make an instance variable in Rocket, called "EXA"

    Both with initial value -45678

    Add events :

    1 When c clicked- spawn Rocket

    2 every tick

    for each Rocket

    If Rocket"EXA" is not 1            

                              - Rocket spawn Exhaust

                              - set Rocket"EXA" to 1

                              - set Exhaust"spawner" to rocket.UID

    3 every tick

    For each rocket

    Exhaust "spawner" = rocket.UID

                                    -set Exhaust postion to rocket.x rocket.y (or whatever)

    4 For each rocket

    When rocket collisions with x

    Exhaust "spawner" = rocket.UID

                                     -Destroy Rocket

                                     -Destroy Exhaust

    May need a little tweaking.

    saludos :D

  • dl.dropbox.com/u/42356832/Sin%20t%C3%ADtulo.jpg

    You click add action, then any sprite or object, and choose a parameter.

    Then you get that window, with low opacity, and when you click system, you get all the variables of system.

    saludos :D

  • Wrong link.

    I would like to see that example.

    saludos :D

  • I Wrote "best game engine" in google, and got to this site nuverian.net/2011/01/17/the-best-game-engines-for-indie-game-developers

    I read descriptions, and when i got to construct 0.99 I had to try it...I clicked the link, got me here, I saw there was a "Construct 2" and decided to go in deeper.

    I'm so glad i did.

    saludos :D

  • Thanks !

    <img src="smileys/smiley32.gif" border="0" align="middle" />

    saludos <img src="smileys/smiley1.gif" border="0" align="middle" />