Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 checking event coordinates?
#1
Code:
p $game_map.events[5].x  
p $game_map.events[5].y

so I figured out I could do something like the above,

when I tried to do a conditional for

Code:
$game_map.events[5].y == 29

I noticed nothing happened, even with the response was supposed to be simple, like

Code:
@>Conditional Branch: Script: $game_map.events[5].y == 29
@>Text: Testing
@>
:Else
@>
:Branch End
@>

How do I query the coordinates of an event and have the computer respond properly?
Reply }
#2
Add an 'if' in front of that.
if $game_map.events[5].y == 29
The script thing in the conditional branch checks if the code in it returns true or not. Since '$game_map.events[5].y == 29' doesn't return anything on its own... nothing happens.
Reply }
#3
While I put the if in there, it didn't work. If doesn't work too often in XP programs, especially conditional event scripts.
Reply }
#4
If there is less than 5 events on the map the it will fail obviously.
Reply }
#5
Alright, just checked, I guess that the conditional branch thing actually DOESN'T need the 'if'.
So... either the event with the conditional branch isn't running, or event 5's y is not 29.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Change event graphic? Bennerdeben 2 4,277 11-15-2020, 10:13 AM
Last Post: Bennerdeben
   Event collision problem with FPLE script ThePrinceofMars 2 5,219 11-11-2014, 06:30 PM
Last Post: ThePrinceofMars
   Checking if a file exists without knowing the extension? PK8 1 4,569 05-29-2011, 10:13 AM
Last Post: MGC
   Tagging a Common Event to an accessory Shiroiyuki 3 5,160 05-07-2010, 02:54 PM
Last Post: Shiroiyuki
    Level Up Event Script daojones 8 11,013 04-09-2010, 06:48 PM
Last Post: daojones
   make event unpassable even by jumping mangamaniacs2064 4 6,642 04-05-2010, 11:57 AM
Last Post: mangamaniacs2064
   Issue with RTAB and battle event systems... samsonite789 4 6,788 11-08-2009, 07:21 AM
Last Post: Jaberwocky
   Getting the ID of "This common event". PK8 6 9,390 09-17-2009, 12:24 PM
Last Post: Zeriab
   VX Show Picture Event Command Code? PK8 2 5,761 02-27-2009, 11:30 PM
Last Post: PK8



Users browsing this thread: