Jump to content

Multi-weapon NPC's?


Recommended Posts

Posted

Is it possible for me to make it so that a character uses a primary gun as their main weapon and a melee weapon as their secondary?

 

 

Droidy365 likes this
Posted

This is a really neat idea. I'm not 100% on how the If and else commands work when you double-click them in Behaved. That parts confuses me and maybe someone who has messed with those can help out. All I know is what you can SET you can GET but after that forget about it.

 

Now, The if/else statement shouldn't be too hard.

 

If ( whatever variable we a re checking for is true)

      set weapon (blaster)

 

Else (whatever variable we are checking for is false)

      set weapon (melee)

 

The biggest hurdle then becomes what variable. So, how would we be able to say "if enemy is > 128 units from NPC, then NPC uses blaster. Else, if enemy is < 128 units from NPC, then NPC uses melee weapon". I'm not sure from what I looked at in Behaved for it would work this way. There is no way in Behaved to script ammo count it seems, so you can't use that and that would be ideal.

 

The second option is if the NPC was stationary, then a trigger once can be set near that NPC which could trigger a script for him to use a melee weapon when the player touches the trigger. But, it wouldn't be as good as the if/else option.

Posted

Is it possible for me to make it so that a character uses a primary gun as their main weapon and a melee weapon as their secondary?

well, for epic challenge mod IV i write a NPC Ai based on boba fett ai when NPC use sabers if enemy is close and use ranged weapons if enemy is far. but that require coding and also replace default AI with new AI... or create new classes of NPC with this behavour, sorry : \

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...