#1 23-02-2008 20:08

gaffkanone
Registered: 16-02-2008
Posts: 10

one key press but sporadic/dice commands

hi all,

is it possible to create a command like:

i press one key
script use sporadic one command of two


here a exapmle code:
:NONAME_2
wait 0
0AB0:   key_pressed 32
jf @NONAME_2
Actor.SetImmunities($PLAYER_ACTOR, 1, 0, 0, 0, 0)
jf @NONAME_2
Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0)
jump @NONAME_2


greez

Last edited by gaffkanone (23-02-2008 20:17)

Offline

#2 24-02-2008 01:44

PARAÐOXON
Registered: 03-01-2008
Posts: 4

Re: one key press but sporadic/dice commands

...yes, this is possible.
You have to take a pointer to help for this!


[TestThis]

0@ = 0
:UserKeyPress
wait 0 ms
0AB0:   key_pressed 32
JiF @UserKeyPress

:ImmunityOff
if
0@ == 1
JiF@ImmunityOn
0@ = 0
jump @PlayerConfig

:ImmunityOn
0@ = 1

:PlayerConfig
Actor.SetImmunities($PLAYER_ACTOR, 0@, 0, 0, 0, 0)
wait 200 ms // <---- dont forget this! Or your changes are too fast!
jump @UserKeyPress



...regards PARA wink

Last edited by PARA&#208;OXON (24-02-2008 01:52)


[SB-CLEO|PlugIn] SA-DevTool

...you seen this video? CLICK

Offline

#3 24-02-2008 03:53

gaffkanone
Registered: 16-02-2008
Posts: 10

Re: one key press but sporadic/dice commands

thx but i have a failure after compiling:

Unkorrekte Direktive: JiF @UserKeyPress.

EDIT:

when i fix the errors to that commandoline:
jF @UserKeyPress

&

jF @ImmunityOn

my game still crash after loading

Last edited by gaffkanone (24-02-2008 04:15)

Offline

Board footer

Powered by FluxBB