ThelastKaveman Posted September 26, 2010 Author Share Posted September 26, 2010 float PushTimer ;timer var used to delay pushing until proper point in animation ;Cow tipping! ;When activated, check to make sure:; A. Player has no weapon out.; B. Player is sneaking; C. Player is undetected;if the above are true, set Push and PushTimer vars Begin OnActivateif IsActionRef player == 1 Set Self to GetSelf if GetDead == 0 set Push to 1 set PushTimer to 0.8 endif endif else Activate endifelse Activateendif End ;If Push has been set to 1 (meaning a successful push took place);wait until timer runs out, then actually do the pushing and reset push to 0 Begin GameMode if ( Push == 1 ) ;Check what perspective player is in, and play the proper animation if ( IsPC1stPerson == 1 ) Player.playidle Loose1stPBrahminPush else Player.playIdle Loose3rdPBrahminPush endif if ( PushTimer <= 0 ) Player.pushactoraway self 1 set Push to 0 else set PushTimer to ( PushTimer - GetSecondsPassed ) endif endif End I basically edited out the things I think I don't need. (I copied and pasted the script so the spaces before should be correct it just doesn't work on the forums) So is there anything I need to clean up ? Link to comment Share on other sites More sharing options...
ThelastKaveman Posted September 26, 2010 Author Share Posted September 26, 2010 This is the original script ScriptName CRBrahminScript ref Self ;stores reference ID for what to pushshort Push ;flag set when animation starts, used to trigger timer float PushTimer ;timer var used to delay pushing until proper point in animation ;Cow tipping! ;When activated, check to make sure:; A. Player has no weapon out.; B. Player is sneaking; C. Player is undetected;if the above are true, set Push and PushTimer vars Begin OnActivateif IsActionRef player == 1 Set Self to GetSelf if GetDead == 0 if ( Player.IsSneaking == 1 ) if ( Player.IsWeaponOut == 0 ) set Push to 1 set PushTimer to 0.8 Self.PlaySound NPCBrahminIdleMoo endif endif else Activate endifelse Activateendif End ;If Push has been set to 1 (meaning a successful push took place);wait until timer runs out, then actually do the pushing and reset push to 0 Begin GameMode if ( Push == 1 ) ;Check what perspective player is in, and play the proper animation if ( IsPC1stPerson == 1 ) Player.playidle Loose1stPBrahminPush else Player.playIdle Loose3rdPBrahminPush endif if ( PushTimer <= 0 ) Player.pushactoraway self 1 set Push to 0 else set PushTimer to ( PushTimer - GetSecondsPassed ) endif endif End Link to comment Share on other sites More sharing options...
ThelastKaveman Posted September 29, 2010 Author Share Posted September 29, 2010 Bump Link to comment Share on other sites More sharing options...
Nadin Posted September 29, 2010 Share Posted September 29, 2010 Looks good. Try it. Link to comment Share on other sites More sharing options...
ThelastKaveman Posted September 29, 2010 Author Share Posted September 29, 2010 Well I was looking in G.E.C.K, but I wasn't really sure how to add it. It looked like you could only have one script per NPC? Link to comment Share on other sites More sharing options...
Sepherose Posted September 29, 2010 Share Posted September 29, 2010 You may have to make a quest script? Mind you, I know next to nothing about geck scripting.... Link to comment Share on other sites More sharing options...
Nadin Posted September 29, 2010 Share Posted September 29, 2010 You could add it on to the end of any NPC's script, or alter it to always run on all NPC's, although I wouldn't know how. Link to comment Share on other sites More sharing options...
Neclipse Posted September 30, 2010 Share Posted September 30, 2010 I'd suggest making a hidden perk and give it to the player through a Quest with a doonce script attached to it. In this example xxx is the perk's editor id. scn BrahminDoOnce short DoOnce Begin GameMode if DoOnce == 0player.addperk XXXset DoOnce to 1endif End This will add the perk to the player. Then have a quest that looks for the condition of player.hasperk XXX == 1. And have that run the above script. Hope this helps. Link to comment Share on other sites More sharing options...
Khajit187 Posted September 30, 2010 Share Posted September 30, 2010 hmm... what about adding the perk for giving mr. lopez "a quick shove"? :D Link to comment Share on other sites More sharing options...
ThelastKaveman Posted September 30, 2010 Author Share Posted September 30, 2010 Wow, Thanks for the Info :D And yeah a perk might work, but how would I go about One) Making it an aggressive action and 2) making it so that it uses a different button? I got it to work on the Merc in Crater-side supplies but it meant that I couldn't talk to him (I know you can't really talk to him, but if you "E" him, he does say something) Also I'm having a RAM problem so I can't venture outside of Megaton (Flashes a bluescreen + computer restarts :ohmy: ) , I'll have to wait for Christmas so I can build a computer for New Vegas + FO3 :down: Link to comment Share on other sites More sharing options...
Recommended Posts