Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   weapons and events (https://forums.graalonline.com/forums/showthread.php?t=43482)

Dach 03-16-2003 01:14 AM

weapons and events
 
for some reason when I use a weapon that uses events offline, it wont work when I go into the editor and load a level without the weapon (to re-add it to the weapons).

NPC Code:

// NPC made by Chad (VIP)
if (created&&!isweapon) {
toweapons testweapon;
destroy;
}
if (keypressed) {
setplayerprop #c,Key!!;
}


put that into a level, load it, then go into the editor and load a different level, now it doesn't work!? They'll start working again if they are called with weaponfired, but this is really annoying and not all my weapons can be called that way...

tlf288 03-16-2003 01:28 AM

It should be Clientside if you are using it on a NPC-Server, and use addweapon and not to weapons.

alarid0 03-16-2003 01:46 AM

Why would you put destroy; after toweapons?

tlf288 03-16-2003 03:11 AM

Quote:

Originally posted by alarid0
Why would you put destroy; after toweapons?
To destroy the NPC.

alarid0 03-16-2003 03:17 AM

But that also destroys the weapon unless he uses addweapon

Dach 03-16-2003 05:42 AM

Re: weapons and events
 
Quote:

Originally posted by Dach
for some reason when I use a weapon that uses events offline
I don't make stuff online, so I'm not using npc-server, nor do I even know it well enough to even worry about it... If anyone wants to test this online, be my guest, try to see if you can get the problem to actually occur though, otherwise you're simply wasting time

NPC Code:
if (created&&!isweapon)


it won't destroy when it's a weapon

Com013 03-16-2003 01:31 PM

Oh yes, I noticed that too. Online it was even worse on Classic because sometimes the system scripts didn't work or weapons didn't initialize correctly. But I thought that was fixed in v2.16 rev2:

Quote:

newfeatures2002.txt
- weapons are initialized correctly on classic servers
But maybe it was not fixed for the offline mode. I remember now that when you look in the debugger before you fire the weapon it's even empty.

Tyhm 03-19-2003 10:39 PM

scripts end after toweapons, so that destroy; is just taking up space. =_=

Oh yeah. And keypressed is clientside only, isn't it? So this'd have to be clientside...if that command works on nonNPCServers at all, and I'm not convinced it does...


All times are GMT +2. The time now is 05:29 AM.

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