Jump to content

Recommended Posts

Posted (edited)

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
Posted

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

Posted

I might be a little dense, but it seems it doesn't help with my problem if I change the index.

 

I'm not sure, but do I need to add a perk as well for the bonus to take effect? Does anyone know?

Posted

CIOS should have a reference, otherwise the effect is being applied to your scripted activator.

 

Player.CastImmediateOnSelf 01RRRDumbellRackEffect

  • Recently Browsing   0 members

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