Author Topic: gun pickup  (Read 3870 times)

Chomps123

  • Posts: 341
  • Turrets: +4/-15
gun pickup
« on: September 02, 2010, 05:51:21 pm »
I need help on making a map that you can pickup weapons off of a rack.  I tried coping the weapon racks off of the blackout map, i can see the weapons, but i can't seem to pick them up. I got netradient and the amp patch is installed.  What is going on?
Don't just live life with work.
Find some time every day to have some fun. ;)

swamp-cecil

  • Posts: 774
  • Turrets: +80/-163
    • Tremulous
Re: gun pickup
« Reply #1 on: September 02, 2010, 09:19:23 pm »
AH! AHAHAHHAHA! I PITY YOU! AHAHAHHAHAHAHHAROFL
the weapons rack in that level probably does not have code for your thingamajigy you want it to do. you need a custom trigger or func or whatever that gives you the armoury pop-upscreen but the weapons are free. get someone to do it for you.
http://tremulous.net/forum/index.php?topic=13985.0
these are stupid suggestions, don't even waste our time.
I don't like your negative attitude.

Chomps123

  • Posts: 341
  • Turrets: +4/-15
Re: gun pickup
« Reply #2 on: September 02, 2010, 09:46:30 pm »
i did not mean a literal weapons rack where it
Quote
gives you the armoury pop-upscreen but the weapons are free.
i ment like the weapons rack in the blackout map where it give you the weapon that you see on it.
Don't just live life with work.
Find some time every day to have some fun. ;)

Aelita

  • Posts: 743
  • Turrets: +147/-34
Re: gun pickup
« Reply #3 on: September 02, 2010, 09:47:55 pm »
AH! AHAHAHHAHA! I PITY YOU! AHAHAHHAHAHAHHAROFL
the weapons rack in that level probably does not have code for your thingamajigy you want it to do. you need a custom trigger or func or whatever that gives you the armoury pop-upscreen but the weapons are free. get someone to do it for you.
http://tremulous.net/forum/index.php?topic=13985.0

Perhaps you should read what he said. He has the AMP patch installed (or maybe he doesn't and he thinks he does and that's where his issues are coming from). This patch allows for advanced map entities that make the game a whole lot cooler. I'd love to see AMP merged with 1.2 ;)

swamp-cecil

  • Posts: 774
  • Turrets: +80/-163
    • Tremulous
Re: gun pickup
« Reply #4 on: September 02, 2010, 10:00:12 pm »
FUCK am i really that stupid?!?!??!
these are stupid suggestions, don't even waste our time.
I don't like your negative attitude.

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: gun pickup
« Reply #5 on: September 03, 2010, 12:46:18 am »
If in the weapon rack that you copied the trigger_multiple targets a target_and, then you need to take that target_and out and make the trigger_multiple target it's targets directly. The target_and would be enabled by the repeater being built, you probably won't need it.
=== Weapon rack ===
3 identical weapons with respawn time (if you already have that weapon, you will get ammo instead)
Code: [Select]
trigger multiple (buttonmask = 128 (=2^7=+button7='use/evo' key))
 |-target_equipment (equipment = <weapon>; spawnflags = 2; gate = <1+RESET_AFTER_USE>)(1 for each weapon, all can have same targetname)
 |  '-target_AND (resetval = 254; gate = 2; targets itself & all following)
 |     |-target_force_weapon (inventory = <weapon>; optionally targets target_speaker)(only 1 of this is needed for all weapons)
 |     |-func_spawn (spawnflags = 1; model = <path to weapon model>)
 |     '-target_delay (gate = 2; wait = <respawntime>; targets AND & func_spawn)
 '-target_equipment (equipment = <weapon>)(has to be triggered AFTER the weapon giving target_equipments)
    '-target_force_weapon (inventory = ammo)

Chomps123

  • Posts: 341
  • Turrets: +4/-15
Re: gun pickup
« Reply #6 on: September 03, 2010, 02:12:00 am »
I did what you said, ran a test and here is what happened I had a rifle in hand went to the rack that had one model of the adv. ckit pressed q and nothing happened.

Is what you gave me only work with multiple weapons (like three rifles)?

I need it to work with only one weapon (like adv. ckit).

Don't just live life with work.
Find some time every day to have some fun. ;)

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: gun pickup
« Reply #7 on: September 03, 2010, 04:05:16 am »
It can work with any amount of weapons. Basically, if you are in the trigger multiple and press the 'use/evo' button, the trigger_multiple triggers the first target_equipment that only passes if you don't already have that weapon, which triggers a target_AND which only passes if it's gate 2 is enabled (when there is a weapon in that slot). If there is, it triggers:
1) itself, changing gate 2 to off,
2) target_force_weapon which gives you the weapon,
3) func_spawn which is disabled and thus the model disappears,
4) delay which later re-enables the AND and the func_spawn.
Then the next slots are 'checked', and finally you get ammo if you have that weapon.
If you need to know exactly what is happening then set sv_AMPdebug 2, and read/post the server console output after using the weapon rack. Ofc you need to set the inventory/equipment keys to the weapon that you want it to give, not just the model.
« Last Edit: September 03, 2010, 04:07:04 am by UniqPhoeniX »