Jump to content

Scripting Beginner Having Problems


pyrofett

Recommended Posts

I'm very, very new to GECK scripting. I'm gone through the wikis and looked at similar scripts to try to find a solution. Basically, I'm modifying the Realistic Portable Tent mod by Fee510 and putting in an autodoc-type medical kit item. You interact and a menu pops up asking what you want to heal. The script just won't compile and I just cannot figure out why. I'm sure it's something very simple. Does anyone have an idea what my problem is? Thanks in advance!

scn FeeTentAutoDocScript

short Button

begin OnActivate

	if IsActionRef Player
		ShowMessage FeeTentAutoDocMessage
	endif

end

begin MenuMode 1001

	set Button to GetButtonPressed

	if (Button == 0)
		player.resethealth

	Elseif (Button == 1)
		Player.RestoreAV RightMobilityCondition 100
		Player.RestoreAV LeftMobilityCondition 100
		Player.RestoreAV RightAttackCondition 100
		Player.RestoreAV LeftAttackCondition 100

	Elseif (Button == 2)
		Player.RestoreAV PerceptionCondition 100
		Player.RestoreAV EnduranceCondition 100

	Elseif (Button == 3)
		Player.RestoreAV RadiationRads 1000

	Elseif (Button == 4)
		setstage Doctors 20

	Endif

end
Link to comment
Share on other sites

Your "IsActionRef" isn't phrased correctly, it needs a number in order to run the check. IE:

 

Begin OnActivate

 

If IsActionRef Player== 1

Showmessage FreeTentAutoDocMessage

Endif

 

END

 

You don't actually need to run the IsActionRef Player== 1 if you simply write:

 

Begin OnActivate Player; This only runs when the player activates it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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