Jump to content


  • Content Count

  • Joined

  • Last visited

About YTD

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. YTD

    "Wave Attack" Help

    Alright, I played around a bit with a test project, and I think I found a way to do what you want, using 2 events, 1 switch, and 0-2 variables (depending on how many directions the wave can go, and how comfortable you are with using script calls). To use this, have any other event turn ON the switch used by these two events. It will then move forward until it either a) hits the player, or b) goes out of bounds. To re-use it afterwards, just turn the switch ON again. 1. Make your "Wave" event (Trigger: Event Touch) (Condition: SWITCH is ON) (Priority: Same as Player) > When this event touches the player, have it do whatever you want it to do, THEN: > Use the movement route command to set its graphics to none. > Set Event Location on itself, teleport it to somewhere the player can't get to. (Else it might hit your player immediately upon being re-activated) > Turn OFF the switch. 2. Make a "Manager" event (Trigger: Parallel Process) (Condition: SWITCH is ON) > Set event location for your "Wave" event, and teleport it back to its starting position. > Set Move Route for "Wave" (Skip, Wait) >> Change its graphic back so it's visible again >> (optional) have it turn towards the player > Set Move Route for "Wave" (Repeat, Skip) >> 1 Step Forward > Loop: >> Wait 60* Frames >> Next, you need to check if the event is far enough away to be disabled. To do this, you can use variables (Set => Game Data => Character WAVE's Map X/Y). Note: When viewing events on the map, you can click anywhere and it'll display the exact coordinates of that tile in the bottom right corner of the window, which you can use to figure out when it should disable the wave. For example, let's say we're using a default 17 x 13 tiles map and want to disable the wave when it reaches the very edge: >> Conditional Branch: If (the X variable) is >= 16 >>> Jump to Label: End >> Conditional Branch: If (the X variable) is <= 0 >>> Jump to Label: End >> If (Y variable) is >= 12 >>> Jump to Label: End >> If (Y variable) is <= 0 >>> Jump to Label: End >> Repeat Above > Label: End > Movement Route for "Wave" to change its event Graphic to None > Set Event Location for "Wave" to be somewhere the player can't go > Turn OFF the switch * you can wait longer than this. Higher numbers are better for performance, shorter times means it responds faster. In my quick testing, 60 frames (1 second) seemed pretty decent. Also, if you don't want to use game variables for this, you can use script calls instead. For example: id = 8 # <= Change this number to the Event ID of your "Wave" event s = 5 # <= Change this to the ID of the SWITCH you're using disable_wave = FALSE disable_wave = TRUE if $game_map.events[id].x >= 16 disable_wave = TRUE if $game_map.events[id].x <= 0 disable_wave = TRUE if $game_map.events[id].y >= 12 disable_wave = TRUE if $game_map.events[id].y <= 0 if disable_wave == TRUE $game_map.events[id].set_graphic('', 0) $game_map.events[id].moveto(0, 0) $game_switches[s] = FALSE end You'd want to edit the numbers used here to match your own event id/switch id/map size (i.e., you'd want to change 16 / 0 / 12 / 0 to the coordinates that should disable the wave). I hope that explanation made some semblance of sense, and that I didn't misunderstand what you are trying to do Edit: Sorry, didn't see how old this thread was. Not sure if it's still relevant Edit #2: On second thought, I think there's a better way to handle the script idea: id = 8 # <= Change this number to the Event ID of your "Wave" event s = 5 # <= Change this to the ID of the SWITCH you're using # Event Boundaries - Disables the Wave: min_x = 0 # <= if the event is ON or LEFT OF here (X Axis) max_x = 16 # <= if the event is ON or RIGHT OF here (X Axis) min_y = 0 # <= if the event is ON or ABOVE OF here (Y Axis) max_y = 12 # <= if the event is ON or BELOW OF here (Y Axis) disable_wave = FALSE while disable_wave == FALSE # start of loop wait(60) disable_wave = TRUE if $game_map.events[id].x >= max_x disable_wave = TRUE if $game_map.events[id].x <= min_x disable_wave = TRUE if $game_map.events[id].y >= max_y disable_wave = TRUE if $game_map.events[id].y <= min_y end # end of loop $game_map.events[id].set_graphic('', 0) $game_map.events[id].moveto(0, 0) $game_switches[s] = FALSE This one replaces the loop and wait commands above, and anything that comes after it. It still waits for 60 frames before checking again if the switch should be disabled. Using a nearly empty default-size map, with a Normal/2x Slower speed wave event, the script ran 3-4 loops before the Wave event went out of bounds and the switch was turned off.
Top ArrowTop Arrow Highlighted