<legalese>
Warning! The following is a technical way to circumvent the impossibility of summoning NPC's on coordinates which are not hard-wired in an event, but may change depending on the values of some variables. Since it involves the use of hex editors and other hi-tech instruments, read on at your risk.
</legalese>
It looks like there is a way around the fact the "NPC control" event does not allow (as of now) global variables to be used. This may be problem because sometimes it would be nice to "summon" an NPC right in front of the player, independently on the position of the player on the map (in this way you may have an NPC which "follows" the player, for example).
Examining the structure of the .cet file with a single "NPC control" action, it
is possible to manually change the values of X and Y, substituting them with the names of the variables (for example, &&gb;_Player_X, &&gb;_Player_Y, which have values calculated basing on PlayerX and PlayerY). The only problem is that one needs an hex editor (I've used BBEditLite, which allows for Hex dumping), since the data are stored as follows
two bytes containing the number of events (eg, in hex, 00 01)
two bytes containing the number of linked events (00 00)
a byte containing the length of the name of the event (0A)
the name of the event: "Add an NPC" (you see, ten = 0A chars)
a byte containing the length of the type of the event (0B)
the type of the event: "NPC Control" (eleven = 0B chars)
two bytes containing the length of the data to follow (00 2B = 43)
the data: 0,Dark caster,&&gb;_Player_X,&&gb;_Player_Y,0
where
Dark caster is the name of the NPC (as defined by the user, i.e., me)
0 means "Add"
&&gb;_Player_X,&&gb;_Player_Y is the location
0 means "Custom coordinates"
As you can see, the data is 43 characters long (including the commas).
Then 18 bytes set to 00 hex (purpose: unknown)
End of event terminator: hex 00 01.
Thus, one only has to change the data in the part with the location, count how many characters are in the data, and change accordingly the two bytes preceding the data.
I've tested it, and it works. Of course, it cannot be edited inside Coldstone, but it displays correctly in the event when one opens it
BTW I've also tried to change the name of the NPC to be summoned using a variable, but this method does not work, as it does not work with "Change map cell" :frown:
On the other hand, the same trick works (more or less in the same way) for the "Stamp control" event (but I leave to you to discover how to do that).
Hope this helps (and hope this does not reveal secrets not to be revelaed :)),
Alois
------------------