Jump to content
  • 0

Is it possible to make floating variable for npc?


Question

Posted

Hello dear community!

I have a small question about variable: is it possible to make a floating npc variable? Example of script:

-	script	Activation Stone#0::testnpc	1905,{
// lines...
// Trying to make .activate_aid_<HIDDEN NPC NUMBER>...
set .activate_aid_"+ strnpcinfo(2), getcharid(3);   <<< ERROR...
// lines...
end;
}

location,x,y,r	duplicate(testnpc)	Activation Stone#1	1905
location,x,y,r	duplicate(testnpc)	Activation Stone#2	1905
location,x,y,r	duplicate(testnpc)	Activation Stone#3	1905
location,x,y,r	duplicate(testnpc)	Activation Stone#4	1905
location,x,y,r	duplicate(testnpc)	Activation Stone#5	1905
location,x,y,r	duplicate(testnpc)	Activation Stone#6	1905
location,x,y,r	duplicate(testnpc)	Activation Stone#7	1905
location,x,y,r	duplicate(testnpc)	Activation Stone#8	1905

Thank you for advising or helping solve this trouble!

2 answers to this question

Recommended Posts

Posted (edited)
setd( ".activate_aid_"+ strnpcinfo(2) ),getcharid(3);

use setd

 

 

Oh, Sir E M I S T R Y, i missed this function, should re-read script_commands.txt

Thank you Sir, I will try to do this!

 

Update 1.0: Works fine, thank you again!

Update 2.0: to get this value should i use getd? Looks like: " + getd( ".activate_aid_"+ strnpcinfo(2) ) + " will print getcharid(3)?

Update 3.0: looks like working, thank you again!

Edited by Phenomena

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...