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 visit View your posts View unanswered posts

Model Changing in-game

 
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: 29
Location: Jennewa, Airdenor
41 Bank Notes
Items

PostPosted: Fri Jun 01, 2018 1:57 am    Post subject: Model Changing in-game Reply with quote

Trying to put a human in game that allows me to change my model. This is the script I'm using now: *****This is just one script, but I am planning on making several in order to give me a good variety to choose from, this is just an example******

//////////
dim_act 1
dim_flt 1
findactor 0,"Tommy"

label 101

detector_waitforuse 99970001

PLAYER_LOCKCONTROLS 1
zatmyse 1
wait 500
human_changemodel 0, "TommyDELNIKHIGH.i3d"
wait 200
zatmyse 0
PLAYER_LOCKCONTROLS 0
goto 101

However, this is not working in the game. I created a human (NormanHIGH.i3d) without any script and the parent is Primary sector. Is there someway that I need to assign the script above to Norman? The way I inserted the script was by going into Bscript and going to "Insert">"Other" and naming the script NORMANscript1 and then writing the script above. The parent of the script is also Primary sector. I have seen this done in a few mods but I'm having trouble producing it.
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 652
Location: London, England
9903 Bank Notes
Items

PostPosted: Fri Jun 01, 2018 7:49 am    Post subject: Model Changing in-game Reply with quote

You code needs to be put into Norman's script in BSV, it won't work like that as a standalone script 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: 29
Location: Jennewa, Airdenor
41 Bank Notes
Items

PostPosted: Fri Jun 01, 2018 9:20 pm    Post subject: Model Changing in-game Reply with quote

I tried putting the script there, but still nothing happens. I can go to the human in game but the action button never appears!
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 652
Location: London, England
9903 Bank Notes
Items

PostPosted: Fri Jun 01, 2018 11:05 pm    Post subject: Model Changing in-game Reply with quote

In a human script, you need to use 'event use_ab' instead of 'detector_waitforuse'.
_________________

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: 29
Location: Jennewa, Airdenor
41 Bank Notes
Items

PostPosted: Sat Jun 02, 2018 2:28 am    Post subject: Model Changing in-game Reply with quote

Okay, I am starting to get some results by using that line, but when I start the game my model is automatically changing, and when I go up to the human and click, the script gets activated and my model changes, but it only does it once, and seems to not want to repeat the script allowing me to change models multiple times. On the Underboss Mod when changing models an actual menu pulled up allowing free select on which model you wanted to change in to. Any ideas on how to do something like this?
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 652
Location: London, England
9903 Bank Notes
Items

PostPosted: Sat Jun 02, 2018 7:01 am    Post subject: Model Changing in-game Reply with quote

It probably stacked several of the same detector together for different model options. If you repeat the 'event_ab' one below the other, they should stack like a proper menu in-game. Same principle as dropping multiple weapons on the ground in the same spot and trying to pick one up.
_________________

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: 29
Location: Jennewa, Airdenor
41 Bank Notes
Items

PostPosted: Sat Jun 02, 2018 3:51 pm    Post subject: Model Changing in-game Reply with quote

Okay, so I am making some progress as when I start the game my model is no longer changing which is good. When I go to the human where I can change models, it is letting me change, but the script is running through all the models I listed at once without any break or pause. I can click on the human and it will change the models all the way through the end of the script, so I need to figure out how to make the script pause or something between each model change. This is the script I'm using now:

dim_act 10
dim_flt 10
findactor 0, "Tommy"

event use_ab

human_changemodel 0, "Sam.i3d"
event_ab

human_changemodel 0, "Paulie.i3d"
event_ab

human_changemodel 0, "Kasar.i3d"
event_ab

return
Back to top
View user's profile Send private message
mammix

Junior Member
Junior Member


Joined: 20 Sep 2014
Posts: 31
Location: Lublin, Poland
556 Bank Notes
Items
more...

PostPosted: Sat Jun 02, 2018 5:05 pm    Post subject: Model Changing in-game Reply with quote

I am on a different computer, so I can't give you specifics, but theres a command that defines where the script should go to (which label) after event_use ab.
As a result, putting a different label in front of every event_use ab with model change should end up in changing it to a different model.
Theres a program with all the scripts btw, very helpful, I'm not sure if its on mafiascene - if not write here, and tommorow Ill send you it from the other PC.
I do scripts like the one you wrote with a label before event_use ab, and remember to end it with return as it is an event.
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 652
Location: London, England
9903 Bank Notes
Items

PostPosted: Sat Jun 02, 2018 10:19 pm    Post subject: Re: Model Changing in-game Reply with quote

SooperK wrote:
Okay, so I am making some progress as when I start the game my model is no longer changing which is good. When I go to the human where I can change models, it is letting me change, but the script is running through all the models I listed at once without any break or pause. I can click on the human and it will change the models all the way through the end of the script, so I need to figure out how to make the script pause or something between each model change. This is the script I'm using now:

dim_act 10
dim_flt 10
findactor 0, "Tommy"

event use_ab

human_changemodel 0, "Sam.i3d"
event_ab

human_changemodel 0, "Paulie.i3d"
event_ab

human_changemodel 0, "Kasar.i3d"
event_ab

return


dim_act 1

findactor 0, "Tommy"

event use_ab
human_changemodel 0, "Sam.i3d"

event use_ab
human_changemodel 0, "Paulie.i3d"

event_useab
human_changemodel 0, "Kasar.i3d"

return

_________________

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: 29
Location: Jennewa, Airdenor
41 Bank Notes
Items

PostPosted: Sun Jun 03, 2018 12:01 am    Post subject: Re: Model Changing in-game Reply with quote

mammix wrote:
I am on a different computer, so I can't give you specifics, but theres a command that defines where the script should go to (which label) after event_use ab.
As a result, putting a different label in front of every event_use ab with model change should end up in changing it to a different model.
Theres a program with all the scripts btw, very helpful, I'm not sure if its on mafiascene - if not write here, and tommorow Ill send you it from the other PC.
I do scripts like the one you wrote with a label before event_use ab, and remember to end it with return as it is an event.


I would really appreciate it if you could send me that program, it would definitely come in handy for some of the things I am going to try to do.

And thanks for the script AsaSK, but I am still getting the same results in the game using it. It just runs through all the models on one click.
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 652
Location: London, England
9903 Bank Notes
Items

PostPosted: Sun Jun 03, 2018 12:43 am    Post subject: Re: Model Changing in-game Reply with quote

SooperK wrote:
mammix wrote:
I am on a different computer, so I can't give you specifics, but theres a command that defines where the script should go to (which label) after event_use ab.
As a result, putting a different label in front of every event_use ab with model change should end up in changing it to a different model.
Theres a program with all the scripts btw, very helpful, I'm not sure if its on mafiascene - if not write here, and tommorow Ill send you it from the other PC.
I do scripts like the one you wrote with a label before event_use ab, and remember to end it with return as it is an event.


I would really appreciate it if you could send me that program, it would definitely come in handy for some of the things I am going to try to do.

And thanks for the script AsaSK, but I am still getting the same results in the game using it. It just runs through all the models on one click.


When I got a copy of Mafia onto my laptop I'll test some stuff.
_________________

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

Junior Member
Junior Member


Joined: 20 Sep 2014
Posts: 31
Location: Lublin, Poland
556 Bank Notes
Items
more...

PostPosted: Sun Jun 03, 2018 4:20 pm    Post subject: Model Changing in-game Reply with quote

I'll PM you everthing in a sec.

That's the script I was talking about:
Code:

dim_act 50
dim_frm 50
dim_flt 50

findactor 0, "Tommy"
findactor 1,"sam"
findactor 2,"doorssam"

findframe 0,"doorssam"

person_playanim 1, "Nuda02.i3d", 0

label 1
wait 1000
goto 1

event use_ab, 15970007
EVENT_USE_CB 1
policeitchforplayer 0
if flt[0] = 0, 2, -1

enemy_talk 0,67000069
enemy_wait

return

label 2
PLAYER_LOCKCONTROLS 1
ENEMY_LOOK 0
dialog_begin 0,1

return


As you can see, if police is looking for you, "EVENT_USE_CB 1" makes you come back to label 1- so, after that if you try again to PPM Sam, you will end up trying to check if police is looking for you again.
However, if you will do like that:

Code:

label 1
wait 1000
goto 1

event use_ab, 15970007
#CHANGE MODEL
EVENT_USE_CB 2
return

label 2
wait 1000
goto 2

event use_ab, 15970007
#CHANGE MODEL 2
EVENT_USE_CB 3
return


and so on, you theoretically jump from one event use_ab, at least in theory Very happy
Tell me if that will work.
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.051 | Queries: 19