Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Old Scripting Engine (GS1) (https://forums.graalonline.com/forums/forumdisplay.php?f=154)
-   -   players[i] warping (https://forums.graalonline.com/forums/showthread.php?t=63809)

excaliber7388 01-30-2006 04:47 AM

players[i] warping
 
I can't get this to warp anyone but me (this is only part of the script) I've tried many ways, none work x_X srry for another lousy gs1 thread ;)
NPC Code:
for(i=0;i<playerscount;i++)
{
with(players[i])
{
if(strequals(#g,Red Team))
{
triggeraction x,y,warp2,red;
}
if(strequals(#g,Blue Team))
{
triggeraction x,y,warp2,blue;
}

}
}


napo_p2p 01-30-2006 04:53 AM

Change players with allplayers

i < allplayerscount
allplayers[i]

And that will only work serverside. You cannot trigger actions of other players clientside.

talkingnoodle 01-30-2006 04:58 AM

if you use players[] it will only take the players in the level so its better off using allplayers

napo_p2p 01-30-2006 05:11 AM

Also, when changing it serverside, you can go ahead and put in the setlevel2 in the script, instead of using a triggeraction.

ZeLpH_MyStiK 01-30-2006 07:00 AM

Maybe he's only trying to get the players in the level =\

napo_p2p 01-30-2006 07:17 AM

Quote:

Originally Posted by ZeLpH_MyStiK
Maybe he's only trying to get the players in the level =\

In that case, the problem looks like he is trying to use it clientside. Let's ask >_<.

Is this serverside or clientside?

ApothiX 01-30-2006 06:29 PM

I'm pretty sure if he's triggering to the x and y of the NPC, he's trying to switch from clientside to serverside. If that's the case, you can't use with() clientside (I believe)

Judging by the triggeraction, that is a Level NPC, so you should just switch the whole thing over to serverside (It's more secure that way, aswell.)


All times are GMT +2. The time now is 01:50 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.