

Perro Seco, on 04 June 2017 - 03:11 PM, said:
Drek, on 19 February 2017 - 12:46 PM, said:
Trooper Dan, on 08 June 2017 - 10:03 AM, said:
David B., on 08 June 2017 - 12:09 PM, said:
state rotate_door ifvare mycount 16 { setvar mybool 1 setvar mycount 0 } ifvare mybool 0 { addvar mycount 1 } else ifvare mybool 1 ifpdistl 1024 ifhitspace { setvar temp 512 whilevarn temp 0 { getactor[THISACTOR].ang angnum addvar angnum 1 setactor[THISACTOR].ang angnum subvar temp 1 } } ifvare temp 0 soundonce 412 setvar mybool 0 } ends useractor notenemy TEST_DOOR state rotate_door endaI'd like to assign to the sprite a rotating speed ; is it possible at least ?
This post has been edited by David B.: 11 June 2017 - 02:04 AM
Drek, on 11 June 2017 - 08:27 AM, said:
This post has been edited by David B.: 11 June 2017 - 09:44 AM
state rotate_door ifvare mycount 16 { setvar mybool 1 setvar mycount 0 } ifvare mybool 0 { addvar mycount 1 } ifvare mybool 1 { ifpdistl 1024 { ifhitspace { setvar temp 512 // the way this is set up set temp here to full rotation you want getactor[THISACTOR].ang angnum setvar mybool 0 soundonce 74 } } } ifvarn temp 0 { addvar angnum 16 // set speed here 1 is slow, 2 is still slow but faster, use power of 2 nums setactor[THISACTOR].ang angnum subvar temp 16 // match this to angnum above, 4,8,16 maybe 32 are decent speeds } ends useractor notenemy TEST_DOOR state rotate_door enda
This post has been edited by Drek: 11 June 2017 - 12:56 PM
Drek, on 11 June 2017 - 09:58 AM, said:
This post has been edited by David B.: 12 June 2017 - 09:02 AM
action OPENING 1 9 1 1 4 useractor notenemy TEST_DOOR TOUGH OPENING ifpdistl 1024 ifhitspace ifcansee { soundonce 412 action OPENING } enda
define TEST_DOOR 5646
dummytile 5646 128 128 texture 5646 { pal 0 { file "fx/door.jpg" } } model "models/test/new test/door.md3" { scale 2 shade 4 skin { pal 0 surface 0 file "models/test/door.jpg" } skin { pal 30 surface 0 file "models/test/door_30.jpg" } skin { surface 1 file "models/test/metal.jpg" } skin { surface 2 file "models/test/glass.png" } frame { name "closed1" tile 5646 } anim { frame0 "open1" frame1 "open2" fps 10 flags 1 } frame { name "open1" tile0 5647 tile1 5648 } }
Trooper Dan, on 15 June 2017 - 10:08 AM, said:
dummytile 5646 128 128 texture 5646 { pal 0 { file "fx/door.jpg" } } model "models/test/new test/door.md3" { scale 2 shade 4 skin { pal 0 surface 0 file "models/test/door.jpg" } skin { pal 30 surface 0 file "models/test/door_30.jpg" } skin { surface 1 file "models/test/metal.jpg" } skin { surface 2 file "models/test/glass.png" } frame { name "closed1" tile 5646 } anim { frame0 "open1" frame1 "open9" fps 10 flags 1 } frame { name "open1" tile0 5647 tile1 5655 } }
This post has been edited by David B.: 15 June 2017 - 10:43 AM
action CLOSED 0 0 0 0 1 action OPENING 1 2 1 1 10 useractor notenemy TEST_DOOR TOUGH CLOSED ifaction CLOSED ifpdistl 1024 ifhitspace ifcansee { soundonce 412 action OPENING } enda
Trooper Dan, on 15 June 2017 - 11:21 AM, said:
David B., on 15 June 2017 - 11:40 AM, said:
Trooper Dan, on 15 June 2017 - 11:50 AM, said:
This post has been edited by David B.: 15 June 2017 - 12:26 PM
David B., on 15 June 2017 - 12:18 PM, said:
Drek, on 15 June 2017 - 12:34 PM, said:
Drek, on 15 June 2017 - 12:34 PM, said:
dummytilerange 5646 5655 128 128 texture 5646 { pal 0 { file "fx/door.jpg" } } model "models/test/new test/door.md3" { scale 2 shade 4 skin { pal 0 surface 0 file "models/test/door.jpg" } skin { pal 30 surface 0 file "models/test/door_30.jpg" } skin { surface 1 file "models/test/metal.jpg" } skin { surface 2 file "models/test/glass.png" } frame { name "closed1" tile 5646 } anim { frame0 "open1" frame1 "open9" fps 10 flags 1 } frame { name "open1" tile0 5647 tile1 5655 } }
David B., on 15 June 2017 - 12:42 PM, said:
gamevar closed 1 2 action OPENING 1 9 1 1 2 action CLOSING 9 9 1 -1 2 // (I tried also CLOSING 1 9 1 -1 2 but normally the closing starts from the last frame...) useractor notenemy TEST_DOOR 0 ifaction 0 { // (I have read ifaction 0 allows to spare an action) ifpdistl 1024 ifhitspace ifcansee { ifvare closed 1 { soundonce 412 action OPENING cstat 0 setvar closed 0 } else { // (now the part that seems to be ignored) soundonce 412 action CLOSING cstat 1 setvar closed 1 } } } enda
This post has been edited by David B.: 24 June 2017 - 05:27 AM
This post has been edited by Mark.: 24 June 2017 - 06:51 AM
Mark., on 24 June 2017 - 06:17 AM, said:
action CLOSING 1 9 1 1 2 action OPENING 9 9 9 -1 2 // I'm assuming your existing numbers are right useractor notenemy TEST_DOOR TOUGH CLOSING ifpdistl 1024 ifcansee ifhitspace ifaction CLOSING { soundonce 412 action OPENING } else ifaction OPENING { soundonce 412 action CLOSING } enda
dummytilerange 5640 5649 128 128 texture 5640 { pal 0 { file "fx/door.jpg" } } model "models/doors/door.md3" { scale 2 shade 4 skin { pal 0 surface 0 file "models/doors/door.jpg" } skin { pal 30 surface 0 file "models/doors/door_30.jpg" } skin { surface 1 file "models/doors/metal.jpg" } skin { surface 2 file "models/doors/glass.png" } normal { surface 0 file "models/doors/door_n.jpg" } frame { name "closed1" tile 5640 } anim { frame0 "open1" frame1 "open9" fps 8 flags 1 } frame { name "open1" tile0 5641 tile1 5649 } }
This post has been edited by David B.: 24 June 2017 - 07:24 AM
This post has been edited by Mark.: 24 June 2017 - 01:42 PM