Adding Ammo Menu help [EDIT]

Discuss thug2 modding, post your own, share your ideas, ask questions.
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Morten1337 » Sun Oct 24, 2010 1:50 pm

The reason why these anims only work in Barcelona is because its loaded in the "animload"-function in the level script (..levels/ba/BA_Scripts.qb)
animload_ba_mime, or something similar. There is another way to load specific animations but i can't give you any examples right now. You will find the stuff you need in allanims.qb

I could give you i function that i have, for playing animations from an array. But i don't have it available atm.
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Anteara » Mon Oct 25, 2010 2:02 am

Morten1337 wrote:The reason why these anims only work in Barcelona is because its loaded in the "animload"-function in the level script (..levels/ba/BA_Scripts.qb)
animload_ba_mime, or something similar. There is another way to load specific animations but i can't give you any examples right now. You will find the stuff you need in allanims.qb

I could give you i function that i have, for playing animations from an array. But i don't have it available atm.


Okay, thanks.

EDIT: Okay, I figured out how to play anims in other levels now, thanks Morten for that tip. I'm still unsure as to how to link anims together though. Also, it still only works in either story / classic mode, not in online / network.

WhoElseButMe, When I tried to use the function above, it didn't seem to work, perhaps I entered it wrong.

EDIT2: I can now play the anims in online and network play on all levels. Now all I need is to learn how to link anims.
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Anteara » Thu Oct 28, 2010 4:59 pm

Hey, Just wanna bump this thread - I've managed to slightly get anims linked together after a little search through some files.

Now, I know this is obviously not the best way to do it, but it's the only way I can think of right now.

Code: Select all

:i function $anteara_pedtest2$
            :i call $Skater$.$PlayAnim$ arguments
               $Anim$ = $PED_Mime_Push2Wall$$BlendPeriod$ = %f(0.300000)
   :i $wait$%f(2.282000)$seconds$
            :i call $Skater$.$PlayAnim$ arguments
               $Anim$ = $PED_Mime_Wall2Push$$BlendPeriod$ = %f(0.300000)
:i endfunction


Also, I just got that wait command and havent modified the seconds yet. But it does succeed in linking them together so I'm going to assume i'm getting somewhere. I'll update if i can time them properly.
Last edited by Anteara on Thu Oct 28, 2010 5:36 pm, edited 1 time in total.
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Anteara » Thu Oct 28, 2010 5:46 pm

Beautiful. That works perfectly.

:i function $anteara_pedtest2$
:i $exit_pause_menu$
:i call $Skater$.$PlayAnim$ arguments
$Anim$ = $PED_Mime_idle2Push$$BlendPeriod$ = %f(0.300000)
:i $Skater$.$WaitAnimFinished$
:i call $Skater$.$PlayAnim$ arguments
$Anim$ = $PED_Mime_Push2Wall$$BlendPeriod$ = %f(0.300000)
:i $Skater$.$WaitAnimFinished$
:i call $Skater$.$PlayAnim$ arguments
$Anim$ = $PED_Mime_Wall2Push$$BlendPeriod$ = %f(0.300000)
:i $Skater$.$WaitAnimFinished$
:i call $Skater$.$PlayAnim$ arguments
$Anim$ = $PED_Mime_Push2idle$$BlendPeriod$ = %f(0.300000)
:i endfunction


It plays perfectly from idle to idle, thanks!
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Anteara » Fri Oct 29, 2010 4:56 pm

Hi, Sorry for the double post, not sure if an edit would get a bump, though.

Anyway, My mod is almost complete, the main functions i have in here are - Theme Menu (Change Bal colours), Anim menu, On/Off Menu, and Vehicle Menu.

The Vehicle Menu works pretty well, I can play with a wheelchair, bull, tricycle, gokart, etc with a function like this...

Code: Select all

:i function $anteara_tricycle$
            :i call $Vehicle_Start$ arguments
               $params$ = $tricycle_params$
:i endfunction



Image
As you can see, the physics of the vehicles and anims, tricks, etc work fine, the model of the vehicle doesn't load, but i'm assuming that's because all i'm doing is loading the physics and anims of it. So i can get around to that later.
Image


That successfully loads the tricycle for all levels and I can use it online.

Now, this may sound dumb, but i can't figure out how to get back on my skateboard. I've looked everywhere, I just can't figure it out... Any tips? :S


EDIT: Just a quick edit - I've managed to load the model for the vehicles, and then use them. I can only use this in story mode, and in nawlins. If I use that vehtest script, it'll put the tricycle model as my board, then i can use the tricycle script to use the tricycle anims and physics, and it works. But - I can't use it online. I'm not really sure where to put the model script to make it work online, I check in models.qb, put it in every function and it did nothing.

Code: Select all

:i function $anteara_vehtest$
                     :i $skater$.call $AddGeom$ arguments
                        $name$ = $vehicle$$model$ = %s(46,"models\Veh\veh_tricycle\veh_tricycle_skin.skin")
:i endfunction


i'm still having a problem though finding out how to kill the vehicle, and get the skateboarding physics and anims back.
Last edited by Anteara on Fri Oct 29, 2010 7:53 pm, edited 2 times in total.
Morten1337
Posts: 132
Joined: Tue Jun 08, 2010 11:11 pm
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Morten1337 » Fri Oct 29, 2010 7:16 pm

Code: Select all

:i $vehicle$.$die$


as for switching back to skater physics; im not sure.
try

Code: Select all

:i call $MakeSkaterGoto$ arguments
$OnGround$
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Anteara » Fri Oct 29, 2010 7:23 pm

Hmm, That doesn't seem to work - I just keep idling on whichever vehicle i'm currently riding at the time.
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Re: Adding Ammo Menu help [EDIT]

Postby Anteara » Sun Oct 31, 2010 7:55 pm

Hi, Thanks - It's working now.

I believe I'm done with the mod, and I'll upload a video shortly so you guys can see it.

Here is the changelog if you want to read what's currently in the mod.

Anteara Mod - Made by Anteara.
This mod was made by me as something to do for fun, it is version 1.0, so obviously it's going to improve over time.
----


Anteara Mod V1.0 Changelog;

-Added Animations Menu
-Added ammuniton menu + throw custom ammo
-Added on/off menu;
No Clip On/off
Infinite Combo run Out Timer - On/Off
Infinite Wall Jumps - On/off
Infinite WallShuffles - On/off
Skate on Walls - On/Off
Turn house and street lights on - On/Off
-Edit tricks whilst in a game
-Observe Menu
-Custom restart Menu
-Debug Menu
-Theme Menu
-Animation Menu (Around 30 Animations to play)
-Boneless in Manual (Left + Right + Flip Trick)
-Airshuffle (Left + Right + Flip trick, or DownLeft + Flip trick)
-Spawn 3d Text
-Spawn NPCs
-Move Character Mode
-Luge Mode
-chat commands;
/hi
/ohai
/su
/help
etc
-Spawn models from special tricks
-Flickering Skater / Flickering Deck
----

Coming Soon;

-Time of Day Menu
-Drive Cars Online (Client Side Only)
-Models loaded for vehicles
-Improved Luge and Slalom
-More Chat Functions
-More Physics edits
-Taunt Menu online
-Better NPC Spawning
----


Special Thanks to these people for helping with the mod, and giving support/advice/ideas.
-WhoElseButMe
-Morten1337
-kirillgta.nG

Return to “THUG2 modding”

Who is online

Users browsing this forum: No registered users and 21 guests