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

Scripting help and delete my old post please.

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Mafiascene.com Forum Index -> Ask a Modder - Modding
View previous topic :: View next topic  
Author Message
andrewthiago

New Member
New Member


Joined: 02 Mar 2014
Posts: 7

22 Bank Notes
Items

PostPosted: Thu Oct 20, 2016 12:44 am    Post subject: Scripting help and delete my old post please. Reply with quote

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.
Back to top
View user's profile Send private message
Muggy

Site Staff
Site Staff


Joined: 05 Jan 2005
Posts: 790
Location: Sydenham SE26
276198 Bank Notes
Items
more...

PostPosted: Thu Oct 20, 2016 7:31 am    Post subject: Scripting help and delete my old post please. Reply with quote

I have read both scripts and they are identical afaic.
also if there are any slight changes you could edit
your post *here* rather than keep creating new topics each time

I know you are new here but I have given you
information on our board rules and about posting
please do not create another topic for the same
issue. No no no...don't do that!
_________________

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    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.083 | Queries: 19