Slow Down in Sludge?

Marc_n_SophMarc_n_Soph Member Posts: 111
edited November -1 in Working with GS (Mac)
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

Comments

  • Rob2Rob2 Member Posts: 2,402
    I recommend a chat with the creator of Snow Trax ..Ti studios? did a great job of simulating snow sludge
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    Maybe try creating a game variable called "Speed" and set it to 140

    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!
  • Marc_n_SophMarc_n_Soph Member Posts: 111
    Ahh JonTistudios. Yeah he helped me out on some other stuff. I bought snow trax. great game. Jon also got tilt control workin. I failed. Reverted to buttons for rotation, but there ya go. Sometimes u win, sometimes you make your wife sleep in the shed cos you cant make the accelerometer work.

    Thanks for postin Rob2!!
  • Marc_n_SophMarc_n_Soph Member Posts: 111
    iPhoneDevForMe

    I think you just saved my wife a night in the shed.

    Thanks dude!!! Gonna try that now!

    Marc (and hopeful Soph)
  • Marc_n_SophMarc_n_Soph Member Posts: 111
    iPhoneDevForMe

    Yeah that sorted it!
    Ur a legend m8, nice one.
    Thats two posts, two solutions, in one day!! Kick ass!!!

    Marc n Soph
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    Haha, good to hear!

    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
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Marc_n_Soph said:
    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 think everything in here would've worked except when SlowInWater boolean is false change attribute. max speed back up to 140
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    Chosenone is actually quite correct. Now that I look at it, what he just suggested adding to your original set of rules is almost the same thing as the solution I suggested!

    At least you now have less rules and the same outcome/solution!
  • Marc_n_SophMarc_n_Soph Member Posts: 111
    Yep!! Its workin fine. Thanks everyone for readin and postin!!

    Marc n Soph
Sign In or Register to comment.