![]() |
Send params to putnpc2?
I'm creating a projectile using putnpc2 but I want to send some data to it. It cant read from player.attr.
Is there any way to send some parameters to an NPC created using putnpc2 with a joined class? Thanks :) |
I doubt its the most efficient, but you could always pass them to a DB NPC and use
this.variable = FindNPC("NPC").variable; or set them to a temporary server variable? |
but how do i identify the npc when using findnpc?
There could be more than one instance of the projectile class. |
when the npc was created, make it save the npc id it was :o ( (npccount - 1) I think?), then use the npc id :]
|
Quote:
PHP Code:
PHP Code:
|
You mean..
HTML Code:
with (putnpc2(x, y, "join someclass;")) HTML Code:
temp.npc putnpc2(x, y, "join someclass;"); |
NPC Code: or so |
Quote:
"join(\"someclass\");" |
Quote:
|
Quote:
|
Quote:
@Riot Yea? I didn't know you could pull the object of a putnpc2 |
Quote:
|
Quote:
|
Quote:
|
ok, I found a better way.
looks messy, but works and should be more efficient than findnpc() PHP Code:
|
All times are GMT +2. The time now is 04:56 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.