Slow Down in Sludge?
Marc_n_Soph
Member Posts: 111
Hi. Any ideas on how to make my biker actor slow down when he goes through sludge / mud / water.. etc?
I tried this.
Created Boolean - SlowInWater
Added Water Actor
Added Biker Actor Rules
When overlap with water set SlowInWater to true
Timer
for 3 seconds
When SlowInWater is true Set Self.Motion.Max Speed to 60 (Normal max speed is 140)
He hits the water, slows down, and wont speed up again.
So, I tried making an "Out of Water" actor, to switch the SlowInWater boolean to false, and placed "out of water" actor in scene after my "water" actor. Took out the 3 second timer, and tried it out.
He hits the water, slows down, and wont speed up again. No. Just trundles along like Tubby McLardarse on his way home from the pub on his mums bike after Eight pints and two, yes TWO bags of chips. And when I say tubby, I mean proper tubby. When he goes to the cinema, he sits next to everyone!! Oh! Sorry! ... Gettin excited cos im actually gettin somewhere with my game, and frustrated cos i dont know much bout GS and stuff.
Any help / suggestions (apart from give up) GREATLY appreciated!!
Thanks Loads!
Marc n Soph
I tried this.
Created Boolean - SlowInWater
Added Water Actor
Added Biker Actor Rules
When overlap with water set SlowInWater to true
Timer
for 3 seconds
When SlowInWater is true Set Self.Motion.Max Speed to 60 (Normal max speed is 140)
He hits the water, slows down, and wont speed up again.
So, I tried making an "Out of Water" actor, to switch the SlowInWater boolean to false, and placed "out of water" actor in scene after my "water" actor. Took out the 3 second timer, and tried it out.
He hits the water, slows down, and wont speed up again. No. Just trundles along like Tubby McLardarse on his way home from the pub on his mums bike after Eight pints and two, yes TWO bags of chips. And when I say tubby, I mean proper tubby. When he goes to the cinema, he sits next to everyone!! Oh! Sorry! ... Gettin excited cos im actually gettin somewhere with my game, and frustrated cos i dont know much bout GS and stuff.
Any help / suggestions (apart from give up) GREATLY appreciated!!
Thanks Loads!
Marc n Soph
Comments
When telling your moving actor how fast to go, use the expression editor and select game.speed
When actor collides with the water actor, change game.speed to 60
When actor collides with OutOfWater actor, change game.speed back to 140
This is off the top of my head and im not at home so I cant test it, but see if it helps!
Thanks for postin Rob2!!
I think you just saved my wife a night in the shed.
Thanks dude!!! Gonna try that now!
Marc (and hopeful Soph)
Yeah that sorted it!
Ur a legend m8, nice one.
Thats two posts, two solutions, in one day!! Kick ass!!!
Marc n Soph
Let me know how it works because I now have a game idea that would rely on this! I'll test it when I am at a Mac but if you get it working sooner, I can plan more while on the run!
EDIT: Hit send before I saw your reply! Awesome that it worked! You gotta love the simple solutions! Take care!
-Kyle
At least you now have less rules and the same outcome/solution!
Marc n Soph