andrewthiago
New Member


Joined: 02 Mar 2014 Posts: 7
22 Bank Notes
Items
|
|
Hi ADMIN and MODDERS! Could you delete my old post called '' How to create taxi missions'', please? I just wrote a new scritp below, now, for a new mission. I spent maybe, more than 5 days exploring all the files, trying to figure out what i'm doing wrong, But can't find a resolution for that.
1- How to use the detector command properly, so he can detect me when i'm on a target? He never detects me and the COMPASS, neves turns off.
Please, take a look at this please:
1 - NPC ( 66MAN1) SCRIPT:
*************************
dim_act 3
dim_frm 6
dim_flt 3
findactor 0,"Tommy"
findactor 1,"66man1"
findactor 2,"66target1"
findframe 0,"tommy"
findframe 2,"66target1"
findframe 3,"taxi_point21"
seton 2,0 //Here, i deactivated i won't use before talking to the NPC.
seton 3,0
label 1
enemy_playanim "nudastativ.i3d"
wait 7000
goto 1
event use_ab /// I must talk to the npc, so the code can continue
enemy_stopanim
wait 300
seton 2,1 // I activated the frame (66TARGET1) first.
wait 300
setcompass 2 // Now, the compass is set to aim to (66TARGET1)
////(66MAN10 SCRIPT FINISHED...
>
///////// After talking to the NPC (66MAN1) , the compass will show me the (66TARGET1), whom is my next destination i should go. The next part of the code, will be inside the (66target1) FILE.
///////////////////////////////////////////////////////////////////////DOWN
2 - (66TARGET1) file SCRIPT:
dim_act 3
dim_flt 6
dim_frm 4
findactor 0,"tommy"
findactor 1,"66,man1"
findactor 2,"66target1"
findframe 2,"66target1"
findframe 3,"taxi_point21"
label DETECT
//////////////////////NEGATIVE
wait 200
detector_inrange 0, 10
if flt[0] = 0, -1, DETECT
getactordist 0,2,0
if flt[0] > 10,-1,DETECT
detector_issignal 2, DETECT, -1
goto DETECT
///////////////////////POSITIVE
getactordist 0,2,0 // Calculates the distance between "tommy" and the (66TARGET1)
if flt[0] < 10,5,DETECT
detector_issignal 2,5,DETECT
goto DETECT
label 5
wait 500
setcompass -1
human_addweapon 0,20,0,0
wait 3000
setcompass 3 //Sets compass to the "taxi_point21" frame.
label finish
end
---------------------------------------------------------------
The (66TARGET1) never detects me when i come next to him! I swear, I tried a lot of code combinations, but it never get to work properly.
Which code should i insert, so the (66TARGET1) can detect "Tommy", and proceed to the next part of the mission?
Thank you anyway, and sorry for messing up this post. |
|