Quake3World.com Forums
     Programming Discussion
        Starter Weapon Script


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Starter Weapon Script

Commander
Commander
Joined: 13 May 2015
Posts: 125
PostPosted: 11-02-2015 01:53 PM           Profile   Send private message  E-mail  Edit post Reply with quote


Note: This is NOT exactly about the Q3 source, but since it is still a script I though it best fits here.
So, this script is put in a mod folder in autorun.cfg. When you run that mod, you will always start a map with a weapon (and every five seconds 1 pt of ammo of that weapon will be added) as long as you press ONCE the numpad star. Of course you can bind to other keys but, if you press MORE than once, then the loop will intensify and FPS will DROP.

Code:
set NoWeapStart "wait 2"
set ShotgunStart "give shotgun; wait 5000; vstr ShotgunStart"
set GrenadeStart "give grenade launcher; wait 5000; vstr GrenadeStart"
set RocketStart "give rocket launcher; wait 5000; vstr RocketStart"
set LightningStart "give lightning gun; wait 5000; vstr LightningStart"
set RailStart "give railgun; wait 5000; vstr RailStart"
set PlasmaStart "give plasma gun; wait 5000; vstr PlasmaStart"
set BfgStart "give bfg10k; wait 5000; vstr BfgStart"
set GrapplingStart "give grappling hook; wait 5000; vstr GrapplingStart"
set sv_starterweap "vstr ShotgunStart"
bind kp_star "wait; vstr starterweap; wait"


Also the weapon given depends in the variable sv_starterweap, which can be:

  • NoWeapStart (aka. no starter weapon)
  • ShotgunStart (the default)
  • GrenadeStart
  • RocketStart
  • LightningStart
  • RailStart
  • PlasmaStart
  • BfgStart
  • GrapplingStart

All of which should be self-explanatory.

However I might still test it in my spare time.



_________________
Who cares with me? Everyone ragequit!


Top
                 

Veteran
Veteran
Joined: 05 Dec 2015
Posts: 199
PostPosted: 12-16-2015 02:56 AM           Profile Send private message  E-mail  Edit post Reply with quote


I'll probably modify th@ script to start a match with all the weapons to start with (including the grappling hook).




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.