chaosislife Posted December 1, 2011 Share Posted December 1, 2011 I just can't seem to get this to work right, it compiles but it doesn't do anything unless I tap the sprint button, in which case it crashes the game. What I'm trying to do here is set up a status_text bar to use as a power gauge for the speed of the animations. Then it's supposed to add to the value of the bar when I press sprint and subtract when I'm not pressing sprint. The Bar shows up and thats about it. :RUNFAST008A: $POWER = [email protected] // (int) 04F7: status_text $POWER type 1 line 4 GXT 'RYD3_E' // global_variable // Power0095: [email protected] = 1wait 1if [email protected] <= 200E1: player 0 pressed_key 16jf @RUNFAST_2wait 1000000A: [email protected] += 1:RUNFAST_2wait 1if [email protected] >= 280E1: NOT player 0 pressed_key 16jf @RUNFASTwait 10000062: [email protected] -= 1:RUNFAST_2046if Actor.Animation($PLAYER_ACTOR) == "RUN_PLAYER"jf @RUNFAST_2094 0393: actor $PLAYER_ACTOR perform_animation "RUN_PLAYER" at [email protected] times_normal_rate :RUNFAST_2094if Actor.Animation($PLAYER_ACTOR) == "SWIM_CRAWL"jf @RUNFAST_2142 0393: actor $PLAYER_ACTOR perform_animation "SWIM_CRAWL" at [email protected] times_normal_rate :RUNFAST_2142if Actor.Animation($PLAYER_ACTOR) == "RUN_CSAW"jf @RUNFAST_2186 0393: actor $PLAYER_ACTOR perform_animation "RUN_CSAW" at [email protected] times_normal_rate :RUNFAST_2186if Actor.Animation($PLAYER_ACTOR) == "sprint_civi"jf @RUNFAST_2234 0393: actor $PLAYER_ACTOR perform_animation "sprint_civi" at [email protected] times_normal_rate :RUNFAST_2234if Actor.Animation($PLAYER_ACTOR) == "RUN_ARMED"jf @RUNFAST_2280 0393: actor $PLAYER_ACTOR perform_animation "RUN_ARMED" at [email protected] times_normal_rate :RUNFAST_2280if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_1"jf @RUNFAST_2324 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_1" at [email protected] times_normal_rate :RUNFAST_2324if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_2"jf @RUNFAST_2368 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_2" at [email protected] times_normal_rate :RUNFAST_2368if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_3"jf @RUNFAST_2412 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_3" at [email protected] times_normal_rate :RUNFAST_2412if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_G"jf @RUNFAST_2456 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_G" at [email protected] times_normal_rate :RUNFAST_2456if Actor.Animation($PLAYER_ACTOR) == "SWIM_UNDER"jf @RUNFAST_2504 0393: actor $PLAYER_ACTOR perform_animation "SWIM_UNDER" at [email protected] times_normal_rate :RUNFAST_2504jump @RUNFAST end_thread Any Ideas? Link to comment Share on other sites More sharing options...
ZAZ Posted December 2, 2011 Share Posted December 2, 2011 make a wait after first label :RUNFASTwait 0 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Wesser Posted December 2, 2011 Share Posted December 2, 2011 Make a wait after the first label. There is. 0095 opcode has 2 parameters. This cause the crash. SB sintax allows you to avoid the opcode number for integer and float values declaration. Moreover, the second parameter type of 0393 opcode is float. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
chaosislife Posted December 2, 2011 Author Share Posted December 2, 2011 Ya I tried the wait but it turns out that waits aren't as magickal as I'd like. Also tried removing the opcode and leaving 0095: [email protected] = 1 as [email protected] = 1 ,letting the builder decide which opcode was needed. That din't help either however so I'm thinking it's probably the 0393 which is getting me, and I'll have to bash my head against the keyboard awhile tryna figure that one out. Link to comment Share on other sites More sharing options...
ZAZ Posted December 2, 2011 Share Posted December 2, 2011 0393: needs to insert float, your [email protected] is integer CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
chaosislife Posted December 2, 2011 Author Share Posted December 2, 2011 (edited) do ya think integer to float might help? Edit: :RUNFASTwait 0008A: $POWER = [email protected] // (int) 04F7: status_text $POWER type 1 line 4 GXT 'RYD3_E' // global_variable // [email protected] = 1wait 1if [email protected] <= 200E1: player 0 pressed_key 16jf @RUNFAST_2wait 1000000A: [email protected] += 1:RUNFAST_2wait 1if [email protected] >= 280E1: NOT player 0 pressed_key 16jf @RUNFASTwait 10000062: [email protected] -= 1:RUNFAST_30093: [email protected] = integer [email protected] to_float :RUNFAST_2046if Actor.Animation($PLAYER_ACTOR) == "RUN_PLAYER"jf @RUNFAST_2094 0393: actor $PLAYER_ACTOR perform_animation "RUN_PLAYER" at [email protected] times_normal_rate :RUNFAST_2094if Actor.Animation($PLAYER_ACTOR) == "SWIM_CRAWL"jf @RUNFAST_2142 0393: actor $PLAYER_ACTOR perform_animation "SWIM_CRAWL" at [email protected] times_normal_rate :RUNFAST_2142if Actor.Animation($PLAYER_ACTOR) == "RUN_CSAW"jf @RUNFAST_2186 0393: actor $PLAYER_ACTOR perform_animation "RUN_CSAW" at [email protected] times_normal_rate :RUNFAST_2186if Actor.Animation($PLAYER_ACTOR) == "sprint_civi"jf @RUNFAST_2234 0393: actor $PLAYER_ACTOR perform_animation "sprint_civi" at [email protected] times_normal_rate :RUNFAST_2234if Actor.Animation($PLAYER_ACTOR) == "RUN_ARMED"jf @RUNFAST_2280 0393: actor $PLAYER_ACTOR perform_animation "RUN_ARMED" at [email protected] times_normal_rate :RUNFAST_2280if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_1"jf @RUNFAST_2324 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_1" at [email protected] times_normal_rate :RUNFAST_2324if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_2"jf @RUNFAST_2368 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_2" at [email protected] times_normal_rate :RUNFAST_2368if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_3"jf @RUNFAST_2412 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_3" at [email protected] times_normal_rate :RUNFAST_2412if Actor.Animation($PLAYER_ACTOR) == "FIGHTA_G"jf @RUNFAST_2456 0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_G" at [email protected] times_normal_rate :RUNFAST_2456if Actor.Animation($PLAYER_ACTOR) == "SWIM_UNDER"jf @RUNFAST_2504 0393: actor $PLAYER_ACTOR perform_animation "SWIM_UNDER" at [email protected] times_normal_rate :RUNFAST_2504jump @RUNFAST end_thread Doesn't seem like it, figuring out just wtf Pynton was doing is a bit of a pain. Edited December 2, 2011 by chaosislife Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now