Post new topic    
Chemical Slime
Send private message
Getting NPC ref from their script 
 PostTue Jun 27, 2017 12:52 pm
Send private message Reply with quote
Say I want to run a script through an NPC that returns its reference.
How would I go about doing this?

How can I get a reference to the NPC that is running the script?
Liquid Metal King Slime
Send private message
 
 PostTue Jun 27, 2017 2:07 pm
Send private message Reply with quote
Actually, any script triggered by an NPC can automatically get a reference to the NPC who triggered it.

http://rpg.hamsterrepublic.com/ohrrpgce/Plotscripting_Tutorial#NPC_Scripts

Code:

plotscript, npc activation script, arg, ref, begin
  #arg will be filled with the script argument from the NPC editor.
  #ref will be filled with a reference to this specific NPC.
end
Display posts from previous: