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

script for playing the next script

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

New Member
New Member


Joined: 23 Aug 2014
Posts: 13
Location: Czech Republic
14 Bank Notes
Items

PostPosted: Wed Oct 03, 2018 4:19 pm    Post subject: script for playing the next script Reply with quote

Heyyo again.

If you remember that mission where you have to kill Carlo, do you remember that moment when you go near the window and you jumped out by that animation?
I need to know how is it with that script or some example. I'm trying it to do it for location -> Tommy gets nearby the enemys - Tommy talks some things.. <- -> without need of use_ab
I know the script is > getactordist but i don't know how to use it.. Well i know how to use it but not completely. If you understand me. Salute
Impossible
Back to top
View user's profile Send private message
mammix

Junior Member
Junior Member


Joined: 20 Sep 2014
Posts: 38
Location: Lublin, Poland
1103 Bank Notes
Items

PostPosted: Thu Oct 04, 2018 9:07 am    Post subject: script for playing the next script Reply with quote

Ok, so it goes like this.
Either in one of the enemy's script, or in one script created just for this, you write:

-all the dim_ to make it work,
-find_actors and frames,

then you have to make a label, so when you are NOT in the correct distance, the script wil remain at this place:
label x

then you put the script you talked about, followed by 1st number=1st actor, 2nd number=2nd actor, 3rd number=ID of the script you give it. So - script Y will check what is the distance between actor 1 and 2

GETACTORSDIST 1, 2, Y

then you have to do something with that information - let's say, that your following scripts will kick in if actor 1 and 2 are less than 5 metres from each other:
if flt[Y] < 5, -1, x
-1 means that if the conditions (1 and 2 being less than 5 metres from each other) are satisfied, we go down with the text in the script. Or instead you can put U, it being another label you specify somewhere else in the same script.
x means that the conditions are not satisfied (you are far from each other), so you go back to label x, after which makes everything repeated again.

Afterwards, you just write what do you want to happen if you are close to each other:
person_playanim 1, "Gestikulacenew01.i3d", 0, 1 for example.

All together you have, for example:

dim_act 10
dim_frm 5
dim_flt 9
findactor 1,"TommyTAXIDRIVER"
findactor 2,"Salieri"
label 1
GETACTORSDIST 1, 2, 0
if flt[0] < 5, -1, 1
person_playanim 1, "Gestikulacenew01.i3d", 0, 1

Be careful, though, sometimes this may not works for whatever reason, especially if one of the actors is a basement or something like that, the coordinates then get crazy and the distance is calculated differently. Try changing then
GETACTORSDIST 1, 2, 0
into
GETACTORSDIST 2, 1, 0
and something like that, it may actually work.

Write if you have more questions Smile
Back to top
View user's profile Send private message
OravinCZ

New Member
New Member


Joined: 23 Aug 2014
Posts: 13
Location: Czech Republic
14 Bank Notes
Items

PostPosted: Thu Oct 04, 2018 1:56 pm    Post subject: Re: script for playing the next script Reply with quote

mammix wrote:
Ok, so it goes like this.
Either in one of the enemy's script, or in one script created just for this, you write:

-all the dim_ to make it work,
-find_actors and frames,

then you have to make a label, so when you are NOT in the correct distance, the script wil remain at this place:
label x

then you put the script you talked about, followed by 1st number=1st actor, 2nd number=2nd actor, 3rd number=ID of the script you give it. So - script Y will check what is the distance between actor 1 and 2

GETACTORSDIST 1, 2, Y

then you have to do something with that information - let's say, that your following scripts will kick in if actor 1 and 2 are less than 5 metres from each other:
if flt[Y] < 5, -1, x
-1 means that if the conditions (1 and 2 being less than 5 metres from each other) are satisfied, we go down with the text in the script. Or instead you can put U, it being another label you specify somewhere else in the same script.
x means that the conditions are not satisfied (you are far from each other), so you go back to label x, after which makes everything repeated again.

Afterwards, you just write what do you want to happen if you are close to each other:
person_playanim 1, "Gestikulacenew01.i3d", 0, 1 for example.

All together you have, for example:

dim_act 10
dim_frm 5
dim_flt 9
findactor 1,"TommyTAXIDRIVER"
findactor 2,"Salieri"
label 1
GETACTORSDIST 1, 2, 0
if flt[0] < 5, -1, 1
person_playanim 1, "Gestikulacenew01.i3d", 0, 1

Be careful, though, sometimes this may not works for whatever reason, especially if one of the actors is a basement or something like that, the coordinates then get crazy and the distance is calculated differently. Try changing then
GETACTORSDIST 1, 2, 0
into
GETACTORSDIST 2, 1, 0
and something like that, it may actually work.

Write if you have more questions Smile


BIG Thanks, i'll try it. If i would have an problem i'll write you. Smile Very happy
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.054 | Queries: 19