this rule will work?

first actorhero1 size 200x 200
when self motion linear x >=0 destroy actor spawn actor actorhero2( of size300x 200)
actor hero2 when self motion linear x =0 destroy actor spawn actorhero1

Comments

  • -Timo--Timo- Member Posts: 2,313
    edited September 2014

    sounds like it should work.
    let me make a quick demo

    EDIT: here you go

  • agueisagueis Member Posts: 420

    Hello timolapre1998 it works,
    You wouldn't do it it with key right, down and up?

  • -Timo--Timo- Member Posts: 2,313
    edited September 2014

    Not sure what you mean. You want an actor to be moveable when using the arrow keys (which doesnt makes sense at it is an device with no keys) and when its moving it is actor2 and when not moving its actor1? Do you mean manual made keys in your project?

    You can click my signature for free templates which should help you getting started

    \/\/

  • agueisagueis Member Posts: 420

    Yes i want when actor hero moves(when right is down) spawn actor actorhero2, but when the actor hero 2 is spawned; this is the rule i choose: when key right is up self motion linearx to 300, but i have to press right key again for the actorher2 stop, and i want that when the key right is up the actor hero2 be destroyed and spawn actorhero1, but with right button i have to press 2 times, if you don´t understand me i understand, my english is bad.

  • -Timo--Timo- Member Posts: 2,313
    edited September 2014

    Use my demo and change in both actors the rule

    if mouse button is down change attribute self.motion.linear velocity.X to 200
    Else
    Change motionX to 0

    To

    If key right is down change motionX to 200
    Else
    Change motionX to 0

    I think you mean like that. I can make a demo tomorrow if you dont understand what I mean.

  • agueisagueis Member Posts: 420

    What I really want to do in actorhero2 is make a walking animation where the arms and legs are out of the png image of actor hero 1, i think this is the best way , but i´m not sure.

  • agueisagueis Member Posts: 420

    It doesn´t work the the demo with key right, if you can make the demo thanks anyway

Sign In or Register to comment.