Jump to content

Has this been made?


Jenz

Recommended Posts

Did you know that you can tip Brahims?

I've played Fallout 3 for total 300 hours and found out this yesterday.

Seeing is beliving:

 

I found this fact by playing around on the wiki :biggrin: .

 

 

The first thing that hit me in the face was, this can become a great mod.

Imagine how fun it would be to push people around, also this could solve the problem with that companions don't jump, simply push 'em down the cliffs.

 

Here is the script to push Brahims around.

ScriptName CRBrahminScript

ref Self				;stores reference ID for what to push
short 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 OnActivate
if 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
endif
else
Activate
endif

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

 

 

But... I have two problems.

 

1: I shouldn't remove the pickpocket option so I need a menu, easy to create but I've problems to make it work. It has three options, push, pickpocket, or walk away. None of them work, well expeckt for walk away...

Note: If you have a weapon in your hands you still pickpocket people as usually.

 

2: It will be a pain in *** to attach the script to all humans and most creatures.

Is it possibile to attach the script to factions, race, or anything that means that I don't have to place it on all?

My script:

scn 1PushPeopleAround

ref Self				;stores reference ID for what to push
short Push			;flag set when animation starts, used to trigger timer
Short Button

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 OnActivate

if IsActionRef player == 1
	Set Self to GetSelf
	if GetDead == 0
		if ( Player.IsSneaking == 1 )
			if ( Player.IsWeaponOut == 0 )
				showmessage 1ToPushOrsteal
				Set Button to getbuttonpressed
				If button == -1
					Return
					If Button == 0
						set Push to 1
						set PushTimer to 0.8
						Self.PlaySound NPCHumanKneel
						If Button == 1
						
						EndIf
					Endif
				EndIf
			EndIf
		EndIf
	endif
endif
else
Activate
endif
else
Activate
endif

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

 

Simple but I don't see any wrong with it and it still refuses to do what it's supposed to do. I also note that it's not completly finished because I don't know how to continue the pickpocket option.

Link to comment
Share on other sites

Maybe it's just me, but shouldn't the condition of an "if" conditional be in brackets? I haven't really scripted anything in the Fallout 3 scripting language, but I would think that something might be wrong with the if conditionals in the following block due to the fact that everywhere else the conditions are in brackets while here it is not.

 

I mean without brackets, wouldn't the conditional just treat everything following it as the condition, or would the script compiler simply ignore the conditional altogether and just skip the block entirely? Does the language distinguish between upper and lowercase letters? If it does, then "Button" and "button" might refer to two completely different variables as well.

 

*snip*

If button == -1
	Return
If Button == 0
	set Push to 1
	set PushTimer to 0.8
	Self.PlaySound NPCHumanKneel
If Button == 1

EndIf
Endif

*snip*

 

 

Should probably be the following, unless the second if conditional is nested within the first and the third within the second:

 

*snip*

If (button == -1)
	Return
If (button == 0)
	set Push to 1
	set PushTimer to 0.8
	Self.PlaySound NPCHumanKneel
If (button == 1)

EndIf
Endif

*snip*

 

You could probably also use "elseif" conditionals in case you only need to execute one of the conditions somewhat like this:

 

*snip*

1.	If (button == -1); if button variable value equals -1 execute the following commands.
2.		Return
3.	elseif (button == 0); if button variable value equals 0 execute the following block.
4.		set Push to 1
5.		set PushTimer to 0.8
6.		Self.PlaySound NPCHumanKneel
7.	elseif (button == 1); if button variable equals 1 execute the following block.
8.	 ; not sure why this conditional is empty.
9.	EndIf; ends the block and exists the if conditional begun in line 1.

*snip*

 

In any case, I figure there are other people with much better knowledge of the topic than I, so hopefully I'm not too wrong. :P

Link to comment
Share on other sites

Button -1 must mean that no button has been pressed, or has I missed something?

But the rest has been copy and pasted into my script and i will test it. :thanks:

 

The G.E.C.K ain't case sensitive so everything can be writtin in capslock if one wish to do so.

 

The 8 line is empty because it is there the commands to pickpocket are supposed to be.

 

I don't know but the second or third button depending on how one sees it, the option to do nothing, does it need scripting?

Link to comment
Share on other sites

i think that there is a "force push" type of mod that uses a variation of this:

 

scn VictoryRifleKnockdownScript

ref myself

Begin ScriptEffectStart

set myself to GetSelf
player.pushactoraway myself 5

End

Link to comment
Share on other sites

Can you link it?

 

If it has already been made I don't see any reason to "Reinvent the wheel" as someone else said.

 

EDIT: Found it, as he uses a weapon to push people away I will continue with my mod.

Link to comment
Share on other sites

Well you may be right, I just thought the conditionals looked a little iffy, but how different programming/scripting languages handle such things vary wildly between them. You could always try and get a hold of Cipscis as he probably could point out the error by barely looking over the code, while at the same time juggling a dozen monkies typing on typewriters.
Link to comment
Share on other sites

Well you may be right, I just thought the conditionals looked a little iffy, but how different programming/scripting languages handle such things vary wildly between them. You could always try and get a hold of Cipscis as he probably could point out the error by barely looking over the code, while at the same time juggling a dozen monkeys typing on typewriters.
Link to comment
Share on other sites

You should be able to pushactoraway without using a weapon if you specify unarmed. Maybe create a perk gained through a quest or something. A script something like:

 

scn ForcePushSCRIPT

ref myself

Begin OnHit Player

 if player.HasPerk ForcePush
	  if IsWeaponSkillType Unarmed
		   set myself to getself
		   player.pushactoraway myself 5
	 endif
 endif
END

 

Adding a stop combat command might let you push people around with them taking offense. Don't think this will work as is without additional work. Of course if it did work then it would work with any unarmed attack. Perhaps it could be linked to a variation of the brahmin push animation in a manner similar to paralyzing palm.

 

Just free associating, feel free to disregard. I might dabble with this more myself. I like reinventing the wheel and I thought the brahmin push animation was funny when I stumbled on it in the GECK and tried it out.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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