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

How to create taxi missions and another questions.

 
Post new topic   Reply to topic    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: Sat Oct 15, 2016 5:15 am    Post subject: How to create taxi missions and another questions. Reply with quote

................................

Last edited by andrewthiago on Tue Oct 18, 2016 3:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
MatteoCapoletti

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 05 Mar 2013
Posts: 507

975 Bank Notes
Items

PostPosted: Sat Oct 15, 2016 8:53 pm    Post subject: How to create taxi missions and another questions. Reply with quote

The taxi scripts are in another file

But you can reconstruct them rather complicated though

Have you downloaded thes yet?

Mafia Script Helper


Improved Mafia Script Reference

Can you post of a copy of the scripts that are crashing? there might be an easily fixed formatting problem
Back to top
View user's profile Send private message
andrewthiago

New Member
New Member


Joined: 02 Mar 2014
Posts: 7

22 Bank Notes
Items

PostPosted: Mon Oct 17, 2016 8:34 pm    Post subject: Re: How to create taxi missions and another questions. Reply with quote

MatteoCapoletti wrote:
The taxi scripts are in another file

But you can reconstruct them rather complicated though

Have you downloaded thes yet?

Mafia Script Helper


Improved Mafia Script Reference

Can you post of a copy of the scripts that are crashing? there might be an easily fixed formatting problem



I have pasted your script here as you can see
/Muggy (Admin)

Code:
Hi, i created a script that after talking to a NPC, the compass show me a location to go, that's ok. Now, how that target will detect me so i can move to the next steps of the mission? Do i need to create another file in bscript view and there, write the rest of the code? Take a look at my script:

dim_act 2
dim_flt 2
dim_frm 2
findactor 0,"Tommy"
findactor 1,"66guy"
findframe 1,"taxi_point28"

let flt[1] = frm1
frm_seton 1,1

label 1
enemy_playanim "nudastativ.i3d"
wait 1000
goto 1

event use_ab

setcompass 1
wait 1000
goto1

-------------------
What should i do then?

Thank you so much man!


Last edited by andrewthiago on Tue Oct 18, 2016 4:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
andrewthiago

New Member
New Member


Joined: 02 Mar 2014
Posts: 7

22 Bank Notes
Items

PostPosted: Mon Oct 17, 2016 11:52 pm    Post subject: How to create taxi missions and another questions. Reply with quote

I wrote that code above in another post yesterday. I'm really sorry for that. I just wrote a new scritp below, now, for a new mission, who I spent maybe more than 15 hours exploring all the files, trying to figure out what i'm doing wrong. 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
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.028 | Queries: 19