I must be really stupid! Moving Left then Right
DanielA
Member Posts: 101
Ok im stumped. I bet theres an easy way to do this but i dont know how.
IF Actor 1 hits Actor2 Move right. IF Actor 1 hits Actor2 Move left. EXT! So if Actor1 hits Actor2 go the opposite directions and so on. But Actor1 is going to keep hitting Actor2.
I have tried a few things like.
1st tried this:
Atributes: "Actors1 Direction"
Actor1: Rule if "Actors1 Direction" = 0 Move Right at 100,
Rule if "Actors1 Direction" = 1 Move Left at 100,
Rule if Actor1 Collides with Actor2 and "Actors1 Direction" = 0 then change "Actors1 Direction" to 1.
And so on i have tried lots of these ideas.
I just cant figure this "thing" out for some reason. Please help with a detailed response haha
Thanks BadAsApps
IF Actor 1 hits Actor2 Move right. IF Actor 1 hits Actor2 Move left. EXT! So if Actor1 hits Actor2 go the opposite directions and so on. But Actor1 is going to keep hitting Actor2.
I have tried a few things like.
1st tried this:
Atributes: "Actors1 Direction"
Actor1: Rule if "Actors1 Direction" = 0 Move Right at 100,
Rule if "Actors1 Direction" = 1 Move Left at 100,
Rule if Actor1 Collides with Actor2 and "Actors1 Direction" = 0 then change "Actors1 Direction" to 1.
And so on i have tried lots of these ideas.
I just cant figure this "thing" out for some reason. Please help with a detailed response haha
Thanks BadAsApps
Comments
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Can you describe the action you want to happen (leaving out your behaviors/code)?
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
He will walk into walls kinda like this HAHA!
There are two wiki entries which will help you out. The first is called "How do make an actor pace back and forth?" That's here:
http://gamesalad.com/wiki/how_tos:gsc_pacing
In that article is a link to Directional Animation, if you need it.
Sure it'll work out as you want after running through those!
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I really dont understand how u found that. Im always asking questions on the forums and then they show me a wiki for exactly what i need. Where in the Wiki does it show all of these lessons?
In case you don't know: there are game templates from other members by clicking Shared Projects, in the dialog that first opens with the GS prog (although it's down again for maintenance at the moment). Also, if you click on Profiles – also on the GameSalad home page – then Browse, there are quite a few games there from other members; many allowing you to download the GS game file, for you to study/emulate/learn from.
I'm certain these'll help you out.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
One more questions
Have any ideas or way to check that if the actor touches a wall and then touches the next wall in less then 1 second something happens.
Sorry for all the questions
As it's getting on for quarter to one in the morning here in the UK, I'm feeling a bit weary so can't quite work it out exactly, but here are a few thoughts off the top of my head:
Firstly, it's best to make your two walls as two seperate Actors. Make two boolean game or scene attributes, called HitW1 + HitW2, for an example.
When the first wall is hit, make HitW1 true, the other false. Vice verse for the other wall. A timer will be involved as well, as an attribute, counting the fractions of a second, triggered to count from 0 when the first wall is encountered, stopping it when the second wall is hit; another Rules that says if Timer attribute <1, then the something happens.
Sorry I can't be more helpful at the moment, i'm about to fall off of my chair with tiredness! (I'll still be making myself one last cup of tea, though...)
;-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thats a good idea and i have thought of a few things like that idea but theres a few problems. The walls have to be the same actor... What im trying to make in this game is a computer controlled person walk back and forth and you move the walls till he is trapped, and hits both walls in under a second. I don't want to give out to much detail of the gameplay because as much as i would like to trust everyone on the forums i cant. (and its not even that good of an idea)
I can obviously trust you so If im not making enough sense please email me at Davnieli@gmail.com.
Thanks for all the help Gyroscope
Daniel/BadAsApps