Scripting fireweapon, useweapon or another solution for my m

Post » Thu Jun 14, 2012 9:09 am

I'm putting together a fallout lore friendly http://www.youtube.com/watch?v=_HRKgHwPxHw based on the robobrain. Nothing groundbreaking or unique, just using illiysium's vehicle script and a slightly modified model. I thought I'd be able to use a playgroup AttackRight 1, a 16 frame delay and a fireweapon command. However the bot has 3 AttackRight animations, with only one being an actual attack. The playgroup command is choosing one that simply has the hands at the torso with the claws pointing up, so the mech's just firing off a laser into the sky.

From what I'v read I can't select the specific animation in the group, so will I need to copy it and make it a idle animation to plug into the script.

Or is there a better way. I thought about utilizing the useweapon, so I didn't have to deal with any animation issues, but a required parameter is the target and I have no idea how to generate that dynamically during the battle. Do I make an ref that's a floating reticle. Or some block that acts as a sort of bot assisted auto aim via script that can be place ref's in the var when the crosshair is close to a actor/object.......or ?????
User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Wed Jun 13, 2012 10:20 pm

Well copied (and renamed) the RightAttack to the idle animations, gave it an ID and plugged it into the script. The animation does go through it's cycle, but.....

I guess I need a timer to have the fireweapon function go off at the 15th frame of the animation. Right now it's like a ridiculously powerful Gatling gun if you hold down the fire button, firing at a very high rate through the whole range of the animation. Plus I don't have access to any other direction (up, down left, right etc) which can make it tricky to hit actors (especially when the mech is double their height and the laser is going right over the head).

So I think I'll have to move on to the useweapon function. If anyone has a idea how to implement the target parameter (as a ref) that would be great. Then I won't have to deal with any animation issues, the game engine will just use the appropriate animation for hitting the target.

I'm thinking there is probably a script/function that returns the ref of anything under the crosshair. That would work if it could be pluged into variable and that var used as the parameter (don't know if it will work, target parameter not accept a var).

Anyway any ideas/suggestions would be appreciated.
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm


Return to Fallout: New Vegas