FAQFAQ    Board RulesBoard Rules    SearchSearch    LotteryLottery    RouletteRoulette    UsergroupsUsergroups
     RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Shop    Log inLog in 
View posts since last visitView your postsView unanswered posts

In-game model changing

 
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Modding
View previous topic :: View next topic  
Author Message
SooperK

Junior Member
Junior Member


Joined: 10 Nov 2014
Posts: 39
Location: Jennewa, Airdenor
73 Bank Notes
Items

PostPosted: Tue Mar 12, 2019 1:30 am    Post subject: In-game model changing Reply with quote

I'm pretty positive I have posted about this somewhere on the site once before but I can't seem to find it, so I am sorry if this is a repeat. I was wondering if anyone has any good scripts (or would be able to show me what works) for in-game model changing. Several of the mods I have played have this, for example, I believe in the Alive Mod there are telephone booths where you can go and change your model. Would this be some sort of detector? I have tried several of my own scripts, but nothing seems to work. The closest I have got is setting up a human (which is what I am trying to do) and gave them script with several "human_changemodel 0, "nnnnnn". This worked with how I had it, but instead of letting me select, it would race through the script to the end changing my model without pause until it reached the end. If only I could figure out how to insert a break in the script... Thanks for any help!
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 752
Location: London, England
13714 Bank Notes
Items

PostPosted: Tue Mar 12, 2019 9:44 am    Post subject: In-game model changing Reply with quote

I haven't looked so I don't know how MikeMouse did it, but if I understand correctly you can achieve that by 'layering' several scripts on top of one another at the same co-ordinates, e.g.

Script #1 at 0;0;0

dim_act 1

findactor 0, "Tommy"

label 101
detector_waitforuse NNNNNN
model_changeanim 0, "PaulieHIGH.i3d"

goto 101

Script #2 at 0;0;0

dim_act 1

findactor 0, "Tommy"

label 101
detector_waitforuse NNNNNN
model_changeanim 0, "SamHIGH.i3d"

goto 101

Script #3 at 0;0;0

dim_act 1

findactor 0, "Tommy"

label 101
detector_waitforuse NNNNNN
model_changeanim 0, "FrankHIGH.i3d"

goto 101


This will bring up a menu of three options when the action button is pressed, each one representing one of these 'change model' scripts (to differentiate them you can create a new text string in textdb_en and replace NNNNNN in each script).


_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
SooperK

Junior Member
Junior Member


Joined: 10 Nov 2014
Posts: 39
Location: Jennewa, Airdenor
73 Bank Notes
Items

PostPosted: Tue Mar 12, 2019 4:13 pm    Post subject: In-game model changing Reply with quote

Thanks Asa, I will try this when i get home later tonight and post back on how it went. I'm using bscript to do all my scripting work. I understand placing them each at the same coordinates to "layer" the script, but when i use bscrip to write each of these scripts up, would I need to insert a human first (so i can write script) or insert something else? Thanks again!
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 752
Location: London, England
13714 Bank Notes
Items

PostPosted: Tue Mar 12, 2019 5:01 pm    Post subject: Re: In-game model changing Reply with quote

SooperK wrote:
Thanks Asa, I will try this when i get home later tonight and post back on how it went. I'm using bscript to do all my scripting work. I understand placing them each at the same coordinates to "layer" the script, but when i use bscrip to write each of these scripts up, would I need to insert a human first (so i can write script) or insert something else? Thanks again!


For a standard script in BSV you need to select Insert > Other, which will give you a blank script (don't tick the box that says 'no script'). No human needed unless they're the one changing model. No problem Wink
_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
SooperK

Junior Member
Junior Member


Joined: 10 Nov 2014
Posts: 39
Location: Jennewa, Airdenor
73 Bank Notes
Items

PostPosted: Wed Mar 13, 2019 1:04 am    Post subject: In-game model changing Reply with quote

This worked like an absolute charm! Also less complex than the monstrous script I had wrought (overthinking of course!). The only change I had to make was model_changeanim 0, >human_changemodel 0, and it worked flawlessly in game. Thanks! Would you happen to have a youtube channel, or know any modders who have one? I was thinking of finally getting around to that, it might be helpful to show some of the simple things I've learned on modding to some. Been playing since 2005 (5th grade) and still love this game as much as when I first got it, makes me feel nostalgic the older I get. Thanks again! Cool shades
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 752
Location: London, England
13714 Bank Notes
Items

PostPosted: Wed Mar 13, 2019 9:53 am    Post subject: Re: In-game model changing Reply with quote

SooperK wrote:
This worked like an absolute charm! Also less complex than the monstrous script I had wrought (overthinking of course!). The only change I had to make was model_changeanim 0, >human_changemodel 0, and it worked flawlessly in game. Thanks! Would you happen to have a youtube channel, or know any modders who have one? I was thinking of finally getting around to that, it might be helpful to show some of the simple things I've learned on modding to some. Been playing since 2005 (5th grade) and still love this game as much as when I first got it, makes me feel nostalgic the older I get. Thanks again! Cool shades


Sure, a lot of the people I subscribe to are modders as well.
_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
AMadeMan

Senior Member
Senior Member


Joined: 23 May 2017
Posts: 329
Location: United States
456 Bank Notes
Items

PostPosted: Wed Mar 13, 2019 8:26 pm    Post subject: In-game model changing Reply with quote

Awesome! Looks the models can now be changed ingame on the fly. Pretty useful and reminds me of the character swap from Spongebob Battle for Bikini Bottom.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Modding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Generation Time: 0.032 | Queries: 19