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.

Advanced Conditional Branch

Khoa

Member

I need an advanced conditional branch.
Ex:
IF event0001 's self switch = "A" THEN
IF player touch event0001 THEN (event 0001 's trigger is Parallel Process)
please help me to do that, thank you
Sorry for my bad english, I'm Vietnamese
 
IF player tought event0001 THEN (event 0001 's trigger is Parallel Process)

The first part is clear, but I don't know what you mean by that.

EDIT: Lol, you edit it the minute I post XD
For the touch, just make four variables, make two equal to the actor's x and y values, and then make the other two equal to the events x and y values.
 
This sounds like simple event-ing, unless I'm missing something.
(Like a reason it needs to be in a script, rather than the event?)

Page 1:
  Do some stuff
  Turn on Self-Switch A

Page 2: Condition: Self-Switch A is ON, Trigger: Player Touch (or event touch)
  Turn on Self-Switch B

Page 3: Condition: Self-Switch B is ON, Trigger: Parallel
  Do your parallel processing
  Turn on Self Switch C  (to go to a new page)  OR
  Turn off Self Switch B  (to go back to previous page)


If it must be in script,

key = [$game_map.map_id, @event_id, "A"]
if $game_self_switches[key] == true
    # your code here
end
 

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