Jump to content
  • 0

Is it possible to make floating variable for npc?


Phenomena

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

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!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2370
  • Joined:  10/28/11
  • Last Seen:  

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

use setd

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...