Jump to content

Making a working gun..


DiemCarpe

Recommended Posts

NOTICE I need an advanced scripter's help with a few blocks and an advanced animater's help.

I have a gun mod that is pretty epic. I will release it soon if I get some author's approval. I am stuck on on block of script and some animations.

 

ANIMATOR'S HELP: If you are willing, you would need to make an animation of the character if 1st and 3rd person changing a magazine.

I will send you the gun I am working on and then you can try :).

 

SCRIPTER'S HELP: I am a scripter myself, and I am pretty good. But I need help with one block, how can I make it so I can only equip 4 types of ammo for my gun?

So what's in it for you? You get to help make a gun!!! sweet!! you will be mention in the credits as an author and creator of this mod.

 

If you are willing to help, post on this forums topic OR send me an email at [email protected]. I would prefer email.

Edited by DiemCarpe
Link to comment
Share on other sites

For the 4 types of ammo:

You could set an 'OnBowAttack' event handler, which checks if the current current ammo is appropriate for the gun. If it isn't, then, depending on whether the event handler kicks in just before, or just after the projectile appears in the world; either stop it being shot, or ref-walk through the projectiles in the area, until you find the one you just shot; remove it; then add one back to inventory.

 

For the 32 limit:

I'd guess this could be done with an OnEquip block, on your ammo types. Although I don't know if ammo is treated differently.

Link to comment
Share on other sites

  • 2 weeks later...

If you are trying to avoid OBSE, I can only think of one way to cause the gun to not work without the bullets. You could set a flag on the bullets themselves, so that when you equip them it sets a quest variable to 1. When they are unequipped the variable goes back to 0. The gun can be set up to automatically unequip if the bullets aren't equipped.

 

I have to agree with PrettyMurky. OBSE makes everything so much better ;)

With the use of "GetEquippedObject" you could create a more streamlined version of the above using nested "If"s.

Link to comment
Share on other sites

I beg to differ....

 

Scn GunQuestSCRIPT

Short BulletsEquipped
Short GunEquipped

Begin GameMode

If BulletsEquipped == 0
  If GunEquipped == 0
     Return
  Else
     UnequipItem Gun
     Set GunEquipped to 0
     Messagebox "You must equip the bullets first"           ;You could say "You must load the bullets first" or something like that
  endif
Endif

End

 

 

Scn BulletSCRIPT

;;;;This Script goes on all 4 bullets


Begin OnEquip

Set GunQuest.BulletsEquipped to 1

End


Begin OnUnequip

Set GunQuest.BulletsEquipped to 0

End

 

 

Scn GunSCRIPT

Begin OnEquip

Set GunQuest.GunEquipped to 1

End


Begin OnUnequip

Set GunQuest.GunEquipped to 0

End

 

 

Thats just one way of doing it without OBSE. I can think of a few more ;)

I don't see anything advanced in this script, no event handlers or overly complicated or intricate networks of interacting arrays. Just 2 flags.

No offence to anyone who prefers to use event handlers and overly complicated and intricate networks of interacting arrays- I just prefer to keep things simple.

Edited by WarRatsG
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...