Page 1 of 1

I need help getting this to work

Posted: Sun Sep 30, 2012 11:25 pm
by ZurePitchmen83
I'm trying to add natas spin to THUG1, and my attempts won't work no matter what, when i try to launch the game with my edited script, it doesn't launch, it just sits there not responding

My attempted code

Code: Select all

      :i function $PointRail$
         :i call $Vibrate$ arguments
            $Actuator$ = %i(0,00000000)$Percent$ = %i(50,00000032)$Duration$ = %f(0.100000)
         :i call $Obj_SpawnScript$ arguments
            $PointRailSparks$
         :i call $BroadcastEvent$ arguments
            $Type$ = $SkaterPointRail$
         :i $SetTrickName$%sc(10,"Natas Spin")
         :i $SetTrickScore$%i(50,00000032)
         :i $Display$
         :i call $Goto$ arguments
            $Airborne$$Params$ = :s{$AllowVibration$:s}
         :i call $OnExitRun$ arguments
            $Natas_Exit$
         :i $Block$
      :i endfunction
      :i function $Natas_Exit$
         :i call $Vibrate$ arguments
            $Actuator$ = %i(0,00000000)$Percent$ = %i(0,00000000)
         :i $SetTrickName$%sc(0,"")
         :i $SetTrickScore$%i(0,00000000)
         :i call $Display$ arguments
            $Blockspin$
      :i endfunction
      :i $natas_exit_speed$ = %i(300,0000012c)
      :i function $ExitPointRailSpin$
         :i $StopBalanceTrick$
         :i $NoRailTricks$
         :i call $Obj_KillSpawnedScript$ arguments
            $Name$ = $turn_on_rail_tricks$
         :i call $Obj_SpawnScript$ arguments
            $turn_on_rail_tricks$
         :i if $UpPressed$
            :i if $RightPressed$
               :i call $CheckNatasExitDirection$ arguments
                  $dir$ = $UpRight$
            :i else
               :i if $LeftPressed$
                  :i call $CheckNatasExitDirection$ arguments
                     $dir$ = $UpLeft$
               :i else
                  :i call $CheckNatasExitDirection$ arguments
                     $dir$ = $Up$
               :i endif
            :i endif
         :i else
            :i if $DownPressed$
               :i if $RightPressed$
                  :i call $CheckNatasExitDirection$ arguments
                     $dir$ = $DownRight$
               :i else
                  :i if $LeftPressed$
                     :i call $CheckNatasExitDirection$ arguments
                        $dir$ = $DownLeft$
                  :i else
                     :i call $CheckNatasExitDirection$ arguments
                        $dir$ = $Down$
                  :i endif
               :i endif
            :i else
               :i if $RightPressed$
                  :i call $CheckNatasExitDirection$ arguments
                     $dir$ = $Right$
               :i else
                  :i if $LeftPressed$
                     :i call $CheckNatasExitDirection$ arguments
                        $dir$ = $Left$
                  :i endif
               :i endif
            :i endif
         :i endif
         :i call $SetSpeed$ arguments
            $natas_exit_speed$
         :i $Jump$
         :i $DoNextTrick$
         :i call $Ollie$ arguments
            $OutAnim$ = $Natas_spin_out$$JumpSpeed$ = %i(0,00000000)
      :i endfunction
      :i function call $turn_on_rail_tricks$ arguments
            $time$ = %i(10,0000000a)
         :i $Wait$%GLOBAL%call $time$ arguments
            $frames$
         :i $AllowRailtricks$
      :i endfunction
      :i function $PointRailSpinBail$
         :i $SetSpeed$%i(200,000000c8)
         :i $PitchBail$
      :i endfunction


What do i need to do to get this to work? :help

Re: I need help getting this to work

Posted: Sun Sep 30, 2012 11:27 pm
by WhoElseButMe
First you need to figure out what you did to break the game. Adding functions to the game wont prevent it from starting up.

LOL, THUG1 and earlier uses a different if/else statement as well as a different switch statement
Using blubs tool you need your if's / else's to be doIf / doElse and no endcase in switch statements only the end_switch after the last item in the switch statement.

Re: I need help getting this to work

Posted: Sun Sep 30, 2012 11:31 pm
by WhoElseButMe
Basically your script has unrecognized byte code because 0x47 and 0x48 wasn't introduced until THUG2

Re: I need help getting this to work

Posted: Sun Sep 30, 2012 11:32 pm
by ZurePitchmen83
I just tried by adding the natas spin script from the THUG2 grindscripts.qb to the THUG1 script and did some script changing since the anims weren't in THUG1, and yet, when i start up, it won't start!, i even tried replacing kissed the rail, and still won't work, i mean, what else could be different in THUG1 and THUG2 Scripts other than anims?

Re: I need help getting this to work

Posted: Sun Sep 30, 2012 11:34 pm
by WhoElseButMe
Fix these if/else's first. THIS should allow the script to run. And comment out or replace the no existent animations too

Re: I need help getting this to work

Posted: Sun Sep 30, 2012 11:50 pm
by ZurePitchmen83
Post removed due to misreading the reply

Re: I need help getting this to work

Posted: Mon Oct 01, 2012 2:04 am
by WhoElseButMe
Read what I write or don't ask question YOU MUST CORRECT THE IF / ELSE STATEMENTS BECAUSE WHAT YOU'RE USING IS NON EXISTENT TO A THUG1 GAME. Also there are some exe functions that aren't in a thug1 and WILL cause problems later on too

Re: I need help getting this to work

Posted: Thu Oct 04, 2012 4:09 am
by ZurePitchmen83
Ok, i fixed it, now it works but the issue is my skater ends up doing "Kissed The Rail" with the natas spin animations, is there any way to get it to spin instead?

Re: I need help getting this to work

Posted: Thu Oct 04, 2012 4:39 am
by WhoElseButMe
I'm unclear as to what you've actually accomplished. are the on the object only doing a different animation or does it only do a kissed the rail.

Re: I need help getting this to work

Posted: Mon Oct 08, 2012 10:20 pm
by ZurePitchmen83
It does the natas spin, just doesn't spin, it's like kissed the rail with natas spin animations

Re: I need help getting this to work

Posted: Tue Oct 09, 2012 2:36 am
by WhoElseButMe
Off the top of my head I believe you're looking for rotate on the object
skater.rotate or <obj_ID>.rotate