Help - Search - Members - Calendar
Full Version: Erase Event code
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion
dwellercoc
Hi all,

I have a code inside a Coditional Branch (that calls a script to detect collision betwen 2 events):

CODE
if A1 > A2 then
  print "text1" else
if A1 < 2 then
  print "text2";
   # Here I want a code to Erase an Event
else
if A1 = A2 then
  end
end
end


I need a code to Erase an Event inside this code. Can someone help me.

Ty for your time.

Dwellercoc
XZidDede
I'm guessing, but have you used visual basic before? That's the only place I've ever seen if..then...else statements..

But I digress. I'm not 100% sure what you're looking for, but it seems like you just want the scripted equivalent to the [Erase Event] command, right? in which case, it's:
CODE
$game_map.events[@event_id].erase

Assuming you're using the [Script...] command from the events list, leaving it as @event_id will erase the event that called it. Otherwise, you'll have to find the ID.

If that's not what you wanted, then I think you may need to be clearer in terms of your request.
dwellercoc
QUOTE
$game_map.events[@event_id].erase


work out fine, thanks

QUOTE
I'm guessing, but have you used visual basic before? That's the only place I've ever seen if..then...else statements


Yes I used VB a few years ago (you caught me!)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.