How to create item(gun) with no ammo ?

You might want to be more specific about that.

On the map? In the inventory? With a script? With a script on the map?
 
I guess the simplest way would be via script ?
I just want to give player a gun with no ammo. So in inventory...
 
Sorry, but as far as I know you Fo2 engine can not spawn weapons with no ammo. Apart from shooting bullets the only thing that can unload a weapon is a critical miss...
See you.
 
Sirren67 said:
Sorry, but as far as I know you Fo2 engine can not spawn weapons with no ammo.
Correct.
Sirren67 said:
Apart from shooting bullets the only thing that can unload a weapon is a critical miss...
See you.
Now, that was funny!
 
So and how to achieve critical miss DAM_LOSE_AMMO ?

I tried this
critter_injure(self_obj, DAM_LOSE_AMMO);

but it works only with DAM_BLIND, AM_CRIP_LEG_LEFT, etc.
 
One way might be to place an empty gun in a designated container (like the shop inventories or temp boxes), then move it into the player's inventory at the proper time. Don't ask me about the details, though.
 
You *could* try something like this (I can guarantee no success):
Spawn the weapon via script WHILE the PC is in a conversation (remember that containers CAN start a conversation, well, kinda...).
Have your script do so:
1 Check if dude helds a weapon in the active slot.
2 Spawn the weapon in dude's inventory.
3 Have dude wield the weapon.
4 Injure dude with the DAM_LOSE_AMMO bit.
5 Have dude holster the empty weapon and put in his/her hand the previous weapon (if there was any).
Again, I really don't know if this can work. This is all I could think of, sorry.
See you.
 
Mario_Dweller said:
place an empty gun :?. And where do I get it ? :D

When I did the only playable map I ever did, I wanted to put an item with a script attached inside a container, but the mapper only lets you attach scripts to items lying freely. So I put the script on an item, entered playtesting mode, took the item with the in-game character and placed it in the proper container. I don't remember exactly how it worked out, but the end result was that the item was in the container with script and all. So maybe you could put a gun in the mapper, empty it manually, then place it in a container for safekeeping.
 
Per said:
So I put the script on an item, entered playtesting mode, took the item with the in-game character and placed it in the proper container.

Yes, U'r right, that might be the best solution. So I succesfully unloaded the gun, dropped it and saved game. Then I renamed .SAV file to .MAP file and the result is map with unloaded gun on the ground...

Than U all 4 your time...
 
Back
Top