Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
NuKa_BuBble

Need help for a script

Question

Hy everyone, I make a script and actually, it works perfectly. But now I'm really stuck. The situation: The player can turn the event self switch C ON. I want to put a timer on this event page that make the self switch turn OFF after 30 seconds. But this timer must be make in the script. How I can do that?

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

$game_switches[switch_number] = True

or

$game_switches[27] = False

 

the switch_number is a Number of the Switch you use. Is that what you are asking?

Edited by Heretic86

Share this post


Link to post
Share on other sites
  • 0

I imagine you mean more the timer part more than just flipping the switch.

 

http://pastebin.com/05i0aqzu

 

Here's a little demo for it.

http://dl.dropbox.com/u/20787370/Scripts/Incremental%20Wait%20Timers/Incremental%20Wait%20Timers.zip

Share this post


Link to post
Share on other sites
  • 0
$game_switches[switch_number] = True

or

$game_switches[27] = False

 

the switch_number is a Number of the Switch you use. Is that what you are asking?

This is for switches. NuKa_BuBble wants to deal with selfswitches, which is entirely different. Usage for selfswitches is:

$game_self_switches[key] = true/false

Using:

key = [map_id, event_id, switch_id]

With:

  • map_id: ID of the map the desired event is on (as displayed in the project editor)
  • event_id: ID of the desired event (as displayed in the project editor)
  • switch_id: ID of the switch to change (0 = A, 1 = B, 2 = C, 3 = D)

Share this post


Link to post
Share on other sites
  • 0

Speaking of which, can Battles use Self Switches? Those buttons always seem to fail for me trying to use temporary battle self switches from Database / Troops / Event Commands...

Share this post


Link to post
Share on other sites
  • 0

I already know how to turn a switch on/off, thank you to reply that fast. I'll try to be more precise. This event. When the player turn it ON, a timer for this event ID is start. When the event ID timer is equal to 30s, it turn's OFF. I also want that if the player leave the map, all the listed events ID timers continu to run until the switch is turn OFF again. Like if you cut grass, the grass will grow again.

 

Edit: Looks like ForeverZero did. I'll see if that can be useful.

Edited by NuKa_BuBble

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...