Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Wait Random Frames in Set Move Route

poccil

Sponsor

You would use the following:

Code:
minvalue=5;maxvalue=15;@wait_count=(minvalue+rand((maxvalue-minvalue)+1))*2;@move_route_index += 1;return

where 5 is the minimum number of frames and 15 is the maximum number of frames.
 
You Know men, this is the perfect place to ask this questions XD
here you go:

Code:
# If On Map : Replace id with common event id
Script : 
$game_temp.common_event_id = id


Code:
# If in Battle : Replace id with common event id
Script : 
common_event = $data_common_events[common_event_id]
$game_system.battle_interpreter.setup(common_event.list, 0)
 
poccil;321421 said:
You would use the following:

Code:
minvalue=5;maxvalue=15;@wait_count=(minvalue+rand((maxvalue-minvalue)+1))*2;@move_route_index += 1;return

where 5 is the minimum number of frames and 15 is the maximum number of frames.

It works when I use it in the set move call script, but it doesnt in a common event...

PD: Gracias mephisto xD
 

khmp

Sponsor

mephisto;321753 said:
You Know men, this is the perfect place to ask this questions XD
here you go:

Code:
# If On Map : Replace id with common event id
Script : 
$game_temp.common_event_id = id


Code:
# If in Battle : Replace id with common event id
Script : 
common_event = $data_common_events[common_event_id]
$game_system.battle_interpreter.setup(common_event.list, 0)

Didn't know you could do that should have looked there. :( Another way is have your common event as an autorun event and tie it to some switch. At the very end of the common event add a control switch statement and turn off the switch tied to this common event.

Then whenever you want to activate the common event through script you would just say:

Code:
$game_switches[id] = true
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top