View Full Version : eDuke32 question
drvarek
10-18-2005, 12:36 PM
hey
i'm workin on my mod, and i'm still learning the eduke con commands, so i'll post my questions here.
ok, i need to disable some weapons (expander, trip bombs, freezer).
i had this idea, but it doesn't work:
onevent EVENT_WEAPKEY7
{
nullop
}
endevent
i've managed that those weapons don't show any graphics and switch back to previous weapon (using 0 ammo for that weapon), but i whould like to really disable those weapons, so switching to them whouldn't do anything.
Mblackwell
10-18-2005, 12:43 PM
drvarek said:
hey
i'm workin on my mod, and i'm still learning the eduke con commands, so i'll post my questions here.
ok, i need to disable some weapons (expander, trip bombs, freezer).
i had this idea, but it doesn't work:
onevent EVENT_WEAPKEY7
{
nullop
}
endevent
i've managed that those weapons don't show any graphics and switch back to previous weapon (using 0 ammo for that weapon), but i whould like to really disable those weapons, so switching to them whouldn't do anything.
o.0
All you've done is put a { } within a { } (nullop is the same as saying { } or "do nothing"), in this case you aren't canceling the event, you just aren't adding any additional code.
You must set RETURN to -1 to disable an event.
http://www.eduke32.com/wiki/Onevent
drvarek
10-18-2005, 01:43 PM
thanks!
this works, but i still have one problem.
weapons 9 and 10 are ok, but the under weapon 7 there are 2 weapons wich are disabled and i only want to disable expander.
any ideas?
onevent EVENT_WEAPKEY7
{
ifvare WORKSLIKE SHRINKER_WEAPON
setvar RETURN -1
}
endevent
--
I have also my own question http://forums.3drealms.com/ubbthreads/images/graemlins/smile.gif How to make other weapon than shrinker have a sub-weapon? So when you press the same key second time you have te second weapon?
drvarek
10-18-2005, 02:05 PM
hey, thanks for your answer!
i have finally disabled all weapons wich i don't need to use!
maybe this thread will help
this thread (http://forums.3drealms.com/ubbthreads/showflat.php?Cat=0&Number=849256&an=0&page=1)
the basic idea is that when you press a weapon key you want for the second time, you swap all WEAPONx_xxx variables with new ones and also swap a variable for graphics...
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.