Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » butterfingers crate  () 1 Vote
Re: butterfingers crate [message #486089 is a reply to message #486079] Fri, 14 February 2014 08:51 Go to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma:
General (5 Stars)
The problem you've got is that it's hard to give people a weapon and the correct amount of ammo unless there are powerups to grant that weapon (unless someone added a "grant weapon by preset name", I don't recall seeing it though), and you still have to fix the ammo count afterwards.

One way would be to do it might be something like this (at work right now so making this up as I go along);

On entry;

For each <weapon> in <weaponbag>
  if <weapon> in <list_of_banned_weapons>
    save <weapon.ammocount> to <cache>
    set <weapon.ammocount> = 0



On exit;

For each <weapon,ammocount> pair in <cache>
  set <player.weapon.ammocount> = <cache.weapon.ammocount>



Remember there are two ammo counters, the "loaded" ammo count and the "backpack" ammo count. Save, zero and restore both values.


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Fri, 14 February 2014 08:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: linking presets
Next Topic: Important notice for all renegade mapmakers
Goto Forum:
  


Current Time: Wed Dec 18 10:09:54 MST 2024

Total time taken to generate the page: 0.00646 seconds