Author Topic: Count down time and Nitrous boost expiration after use  (Read 6424 times)

iluvcat

  • Visitor
  • *
  • Posts: 6
    • Yahoo Instant Messenger - iluvcat69
    • View Profile
    • http://www.mauinteractive.com
    • Email
Count down time and Nitrous boost expiration after use
« on: 2005-03-19, 06:45:58 PM »
http://www.mauinteractive.com/tech_ques/scripts.doc

I have placed settings and script information into this doc that displays my attempt to do 2 things:

1: Place a nitrous boost into the game and control it with button 3, in this case, the shift button. THE PROBLEM: the bosst does not stop unless I hit the  shift button again. I need it to time out after a set time.

2: The game is time based and want to start the clock when I leave home. And stop the clock once I have reached my destination. THE PROBLEM: I have an idea of what I need to do. I want to use a bar to represent the count down as it dwindels.

HELP!    :?   :o

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Nitrous boost
« Reply #1 on: 2005-03-20, 07:21:19 AM »
Actually I don't think you need script for this because you could switch to a sprite whose max speed is higher and use special functions and inventory to control how long that lasts before another function is activated that switches you back to the normal sprite.  But to implement it in script, you just need to have another counter to check in OnAfterMoveSprites; when it times out, you set the MoveSpeed back to 10.

It should be very easy to represent the countdown as a bar -- you already have it.  Just make a global function that subtracts 1 from it every frame.  You really don't need script for that.

Also, I see that you are using an Alter Inventory type function with your nitro boost -- why not just set the function to use 1 "Speed Boost" item.  Then it will automatically not activate if you don't have any, and the action of the function can be "Raise Event" or whatever you want.

iluvcat

  • Visitor
  • *
  • Posts: 6
    • Yahoo Instant Messenger - iluvcat69
    • View Profile
    • http://www.mauinteractive.com
    • Email
Special function confusion
« Reply #2 on: 2005-03-21, 12:10:01 PM »
http://www.mauinteractive.com/tech_ques/problem_setting.doc

I put the settings in but received some errors. Can you confirm my settings for me. Thanks.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Count down time and Nitrous boost expiration after use
« Reply #3 on: 2005-03-22, 06:37:37 AM »
Can't download the file -- it's not found or something.

bat

  • Fanatic
  • ***
  • Posts: 234
  • Cheak out the B*t project
    • MSN Messenger - ethanbatmay@hotmail.com
    • Yahoo Instant Messenger - ethanbatmay
    • View Profile
    • The B*t project
    • Email
Re: Count down time and Nitrous boost expiration after use
« Reply #4 on: 2007-01-27, 12:49:37 AM »
Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
whoa! this is OLD!
~bat

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Count down time and Nitrous boost expiration after use
« Reply #5 on: 2007-01-27, 08:55:14 AM »
Why did you post to it?  Did that text about the topic being old get inserted automatically by the system, or were you pointing that out to others yourself?