![]() |
GetNPC + this. variables
okay, when you do
with(getNPC(name)) { this.var=1; } is that for the NPC that called the "with" or the NPC recieving the with? I have a feeling that it's for the recieving NPC, because stefan mentioned something about doing that...but i don't remember for sure now |
reciveing.
its the recieving one.
|
thanks...I thought that was the case, but wanted to make sure...
|
watch
watch me gain post counts.
:p |
for setting variable to npc calling 'name'
NPC Code: for setting variable to npc: 'name' NPC Code: |
you are smart :D
|
Yay
Ummm yeah it for recieving db npc im pretty sure i havent used it though i do use with (npcs.[i]) {} or with (npcs.[-1]) to get just placed npcs from control npc
|
Ok here the correct version:
NPC Code: The this. variable always belongs to the current active npc, which is the npc with the name 'name' when you do the second assignment. Currently there is no way to access the this. vars of the executing npc. |
Quote:
|
Quote:
|
but how do you trigger db npcs??
wait, nm, im stupid, they have a x and y thanks grim |
Quote:
So, it controls the "this." var of the other npc. That would be usefull. |
I found a somesort of primitive way tpo get a this.string to the other npc. and that is by tokenizing it.
tokenize "#s(this.strfrom)" with(getnpc(name)) { setstring this.strto,#t(0); } It works in any sence =\ |
Quote:
i must not be thinking clearly, thanks falados |
Quote:
Quote:
|
| All times are GMT +2. The time now is 12:53 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.