Jump to content

Help needed with script


northfield

Recommended Posts

Hi everyone,

 

I'm trying to add some training equipment for workout and fitness. The idea is that the player should get +1 strength and +30 carry weight at a one-time cost of hunger, dehydration and sleep for a period of 24m. So far all menus turn up correctly in-game, but when I activate nothing happens - the effects are not added to the player. Do I need other things than the script, the "spell" and the activator?

 

Can someone please confirm that the script is functional and/or point me in the right direction. Thanks.

 

scn 01DumbellRackSCRIPT

short hitbutton

begin onactivate
showmessage 01DumbellRackMessage1
end

begin gamemode
set HitButton to GetButtonPressed

if ( HitButton >0 )

	if HitButton == 1
CastImmediateOnSelf 01RRRDumbellRackEffect
showmessage 01DumbellRackMessage2
endif

if hitbutton == 2
endif

endif
end

Edited by northfield
Link to comment
Share on other sites

If you have buttons on a message, they start at index 0. GetbuttonPressed returns -1 if nothing is hit

 

  set HitButton to GetButtonPressed

       if ( HitButton == -1 )
           return

           if HitButton == 0
        		CastImmediateOnSelf 01RRRDumbellRackEffect
        		showmessage 01DumbellRackMessage2
      	endif

Link to comment
Share on other sites

  • Recently Browsing   0 members

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