Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - Time-bound effects

The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: 1wdc on September 30, 2008, 07:48:55 AM

Title: Time-bound effects
Post by: 1wdc on September 30, 2008, 07:48:55 AM
I need a script to make effects time bound ( such as an increase in player speed, that would stop working after 2 minutes.)

Any help much appreciated.
Title: Re: Time-bound effects
Post by: modern algebra on September 30, 2008, 02:21:36 PM
Well, if you are looking for an effect on the map, then all you need to do is use an event like this:

Set Move Route: Player
    Increase speed
Wait: 7200 Frames
Set Move Route: Player
    Decrease Speed

THere are 60 Frames per second, so 7200 frames = 2 minutes.

Anyway, that would work. If you wanted an item to have that effect then all you'd need to do is put it in a common event and have the item call the common event.

If you are looking for effects in battle, then making them have real-time limits doesn't really make sense, unless you are using a different battle script, in which case: link?
Title: Re: Time-bound effects
Post by: 1wdc on October 02, 2008, 06:20:59 AM
I've tried that method, the problem is when I tell it to wait, my character stands still and is incapablie of moving, I've even tried putting the event to parallell proccess and that didn't work either.
Title: Re: Time-bound effects
Post by: tSwitch on October 02, 2008, 12:09:29 PM
my guess is that the move route is executing repeatedly or something.

try this:

Common event 1 (trigger: Item)
Set Move Route: Player
    Increase speed
Switch-Y: on

Common event 2 (trigger: Switch-Y)
wait:7200 frames
Set Move Route: Player
    Decrease Speed
Switch-Y off

or something, idk
I'll see what I can do when I get home.
Title: Re: Time-bound effects
Post by: 1wdc on October 02, 2008, 11:39:00 PM
Quote from: NAMKCOR on October 02, 2008, 12:09:29 PM
my guess is that the move route is executing repeatedly or something.

try this:

Common event 1 (trigger: Item)
Set Move Route: Player
    Increase speed
Switch-Y: on

Common event 2 (trigger: Switch-Y)
wait:7200 frames
Set Move Route: Player
    Decrease Speed
Switch-Y off

or something, idk
I'll see what I can do when I get home.

That didn't work either, I'm surprised I'm the only one who has tried to do this, seems like a common thing for rpgs.