Save-Point
Copy Events XP - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: Copy Events XP (/thread-8898.html)

Pages: 1 2


RE: Copy Events XP - kyonides - 05-26-2024

Code:
  def command_end
    # Clear list of event commands
    @list = nil
    # If main map event and event ID are valid
    if @main and @event_id > 0
      # Unlock event
      $game_map.events[@event_id].unlock
    end
  end

OK, that means the event ID got copied by an internal variable but the event itself got... Skull deleted? Confused
Why it happened [some time] before reaching that point, remains a mystery. Detective
That's the only explanation I can think off the top of my head without getting more information on the issue.
Anyway, let Dog Wulfo help you fix it. Tongue sticking out


RE: Copy Events XP - DerVVulfman - 05-26-2024

BUMP
to version 1.4

Okay...

Well, I looked into it further.  The command_end method in the Interpreter class contains the 'unlock' parameter, but more was that kyonides made mention of an internal variable.  A clue?  Indeed.

The events that were copied were very much exact copies of the original event.  Unfortunately, that was the problem.  The copies were TOO exact.  The duplicates themselves contained data claiming to reside at the x/y coordinates of the original event.  But moreso, they still retained within them the original ID.   If there were fifteen events on the current map, and you created a duplicate, this 16th event should have an ID of 16 within. 

This was sadly not the case... at that time. Events need that internal ID value to function. While messages worked, event erasure, custom graphic changes for a specific 'copy' event would not take place, or anything specific to the event as an individual was non-functional

But now, the new code re-defines the ID of the event as well as its x/y coordinates within its structure before it is actively created and placed upon the map.


RE: Copy Events XP - Mel - 05-26-2024

Everything seems to work fine now. :)