![]() |
Passing Actions
Alright, I have this NPC
// NPC made by Lord Helmut if (created) { x+=.4; y+=.7; } if (playerenters) { message Player 1; } if (playertouchsme) { setani idle,; disabledefmovement; setstring server.axeplayer1,#a; setfocus 31,28; } then I have this one // Graal2002 NPC by Stefan Knorr if (created) { showcharacter; setcharprop #3,head0.png; setcharprop #C0,orange; setcharprop #C1,white; setcharprop #C2,blue; setcharprop #C3,red; setcharprop #C4,black; setcharprop #2,noshield.gif; dir = 3; } if(playerenters){ timeout=.05; } if(timeout){ if(strequals(#a,server.axeplayer1)){ if(keydown(3)){ x+=5; timeout=.05; } timeout=.05; } } the first NPC is a controlled and the second is supposed to move when the first one is used. Like, the first is a button, im trying to make it so that if they push right it moves the NPC in the ring. Any idea why it wont pass the action? |
callnpc index,event;
i guess that would work |
Babylon is a free server. Callnpc is only for p2p last time I checked. Why not use the server string as a number. first use it as 1 then use other script as 2?
|
The code
if(strequals(#a,server.axeplayer1)){
is comparing your account name to the word server.axeplayer1. if(strequals(#a,#s(server.axeplayer1))){ would more likely run. |
Re: The code
Quote:
|
im confused
first off, what was your ? lordhelmut second, callnpc isn't only for p2p is it?? |
Quote:
|
Quote:
|
timereverywhere;
|
*waits for a cookie*
Yeah that is very true, whenever you express something like a string like server.playeri you have to put #s() around it otherwise the code checks on the string server.playeri not the value of the string server.playeri. |
Quote:
|
Quote:
|
hmmm
I aint sure what you are trying to achiev, but i have created a sniper rifle using a simliar thing but using Keydowns rather than call npc and all that stuff,
|
Re: hmmm
Quote:
|
because it is a weapon not currently used, it isn't a TRUE sniper rifle as in you hit them one place and it only takes so much off, but you cant kill someone with it,
i guess you could call it a long range riffle but then wouldn't sound as good :P |
Quote:
|
i guess you will have to wait and see
|
Quote:
|
| All times are GMT +2. The time now is 06:49 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.