![]() |
only works for leader
why do some of the npcs i make only work for the leader of the level ... is there a way to make them work for everyone ? :confused:
|
i know i hate that
sometimes timereverywhere helps with that sometimes it doesnt. |
That is the downfall of non-npcserver scripting. Timereverywhere might help. Just code and code and code till you find a way to get around it.
|
sometimes nothing u can do about it
|
if(playerenters) timeout=0.05; sets the only instance of timeout for the NPC for the first player who enters. Every subsequent player enters, and it does nothing because the timeout's already in use.
Timereverywhere makes a new timer for that player when it's called. If you don't have timereverywhere before your timeouts, it'll set the NPC's public timeout instead of the NPC's private timeout. so: if(playerenters||timeout){ shootball; timereverywhere; timeout=2; } will shoot a ball at the leader every 2 seconds. if(playerenters||timeout){ shootball; timereverywhere; timeout=2; } will shoot a ball at everyone in the level every 2 seconds. if(playerenters||timeout){ x=(x+1)%62; timereverywhere; timeout=0.05; } will move the NPC right one tile for EVERY PLAYER IN THE LEVEL. if(playerenters||timeout){ x=(x+1)%62; timeout=0.05; } will keep it at a constant speed. |
u messed up with the first and second code. they the same.
|
i tryed making a stairs u auto walk up ... it has stuff like
playerx=43; playery=32; sleep0.5; playery=32.5; and so forth but when i got it uploaded it only works for the first person in the level and it messes up .... whould timereverywhere work with that ? |
Quote:
NPC Code: |
no ice pick that would only work for the leader
|
so what do i do :confused:
|
what i said in the beggining
|
umm try this:
NPC Code: that should work if any player touches it. |
| All times are GMT +2. The time now is 01:21 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.