![]() |
getnpc
How does it work?
|
I'm pretty sure it's the same as getplayer(). Just find the index of the NPC and use getnpc(index) and you can change all the attributes an npc has (x,y,etc..).
|
Quote:
with(getnpc(Name)) gets a database npc from the npc list with(npcs[index]) gets an npc using an index |
& its serverside-only, if you didn't already know :P
|
Thought googi wasn't a scripter o_o
|
Perhaps not, but he is trying hard :)
NPC Code: ^ makes all NPCs in the level express their feelings about me. That kind of loop is very common :) |
Quote:
NPC Code: get npc in a with statement will direct all code to the npc you choose. all actions like setstring and this.value=# will be done inside the npc.. the name of the npc comes from its name in the database, when you create an npc on NC you do this. Example: NPC Code: This will set this.happy string in the Control-NPC to Smile, and the variable this.smiles to 1000. |
Quote:
|
Quote:
Googi is a woman..¬_¬' |
Quote:
|
Quote:
|
"what" is not a verb :)
|
Quote:
|
Quote:
|
Quote:
|
so i'm assuming getnpc doesn't work on local npcs?
|
Quote:
|
Quote:
You can easily stuff it with conditions to check wether the current NPC is the one you want to go "with". |
I don't think he ever said he wanted to do that... he was just asking about getnpc.
|
1 Attachment(s)
Quote:
|
He's a boy.
There was a big thing on the forums a while back about it. |
Quote:
|
:\, my threads on the this forum always seem to be brought off-topic.
Anyways, is it possible to do something similar to timershow but with showimg or showtext instead of having it appear in chat text? |
You could always have the showtext display the variable 'timeout'.
|
Thank you :)
And, lastly, how do I show a this.var using showtext? |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Well i've never heard of timershow to be honest... heh.
|
I think timershow just shows the amount of time elapsed on a timeout as the chat text of the player. Never used it... I think using a variable is easier.
|
| All times are GMT +2. The time now is 08:35 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.