Weapon script.

Forum Archive - from http://theuniversal.net
Locked
User avatar
VDZ
Posts: 1205
Joined: Wed Apr 07, 2004 11:32 am
Location: Netherlands

Weapon script.

Post by VDZ »

Can anybody please tell me just how it works? Every weapon I make doesn't work :\
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

A (possibly) more authoritative and utd description can also be found
http://theuniversal.net/forum/viewtopic.php?t=3362

(which'll be included in the new manual once more bits have been filled in on it)
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Yeh, it ought to be a bit more authoritative - it includes stuff that was added since the knowledgebase info. It is a bit long-winded, I know, but if you're still struggling after digesting all of that, post an example weapon and maybe we can work out what's going wrong.
f
User avatar
VDZ
Posts: 1205
Joined: Wed Apr 07, 2004 11:32 am
Location: Netherlands

Post by VDZ »

Weapon1
{ #DeathShot
Control=Basic
Fire=Basic
Object=Plasma1
Damage=6500
Item=NONE
Speed=6000
Sound=500
BuildDamage=0
}
This is meant to be an instant-kill fast plasma shot.


Weapon2
{ #EvilEye
Control=EvilEye
Fire=EvilEye
Object=EvilEye
Item=NONE
Damage=6500
Speed=1000
Sound=501
BuildDamage=0
}
This is meant to be an instant-kill Evil Eye.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

thiers no expiry or delay.
might be why thier not working.
does sound even do anything?

heres the EE from sabrada:
Weapon #
{ Evil Eye
Fire=EvilEye
Control=EvilEye
Object=EvilEye
Damage=30000
Item=None
speed=10
Delay=1
Expiry=1000
}

it makes sounds and acts exactly like the old EEs did, except has alot more damage and shoots hundreds in a few secs.



it could also be a settings issue :P
i had to copy sabrada's settings file to planitia to get the weaps to work thier, even though thier were no settings i could find that were disabling them.
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

evileye sounds work differently, but most of the main weapon objects should trigger the assignable sounds corresponding to the SOUND= entry in the script num. i think. There might be a +10 in there or something tho :)

That evileye delay time would be severly frowned upon by online game designers and server hosts alike :]. Any weapon (particularly one with unlimited ammo) with a delay time much less than 50-100 is likely to use/require nasty amounts of bandwidth on the server.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

hence why on sabrada, that evil eye is only on the god vehicles :P

maybe the op only vehicles too, but i think i removed it from them.
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Mit wrote:There might be a +10 in there or something tho :).
It's +499. sound=500 plays assignable sound 1. Sound=501 plays sound 2, etc.

If there's a good reason why I'd enjoy hearing it :)


When I popped onto VDZ's world yesterday he had as many errors in the script as there were lines in it... including the first one. So the parser wasn't even picking up the first weapon label - he disappeared before I could work out why but sounds like he has extra lines or spaces or some such crap in the script file itself. Until those are fixed and something's working there's not a lot else we can do.
f
Last edited by Fooli on Sat Jan 28, 2006 10:38 am, edited 1 time in total.
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

yeh, its obvious tho innit ? :)
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

Only to one person in the entire universe :)
f
User avatar
VDZ
Posts: 1205
Joined: Wed Apr 07, 2004 11:32 am
Location: Netherlands

Post by VDZ »

I found the problem.
I typed
Weapon1
instead of
Weapon 1
Locked