View previous topic :: View next topic |
Author |
Message |
OravinCZ
New Member

Joined: 23 Aug 2014 Posts: 13 Location: Czech Republic 14 Bank Notes
Items
|
|
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.
 |
|
Back to top |
|
 |
mammix
Junior Member


Joined: 20 Sep 2014 Posts: 41 Location: Lublin, Poland 1269 Bank Notes
Items
|
|
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  |
|
Back to top |
|
 |
OravinCZ
New Member

Joined: 23 Aug 2014 Posts: 13 Location: Czech Republic 14 Bank Notes
Items
|
|
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  |
BIG Thanks, i'll try it. If i would have an problem i'll write you.  |
|
Back to top |
|
 |
|
|
|
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
|