OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: RolsRois on 30 Jul 2008, 22:59:19
-
:good:
I'm makin a mission whice i started long ago with Marcus3 and got deleted.
i wont specify about the mission cause its not the right forum.
anywayz, the problem is, i've got a car seller, whice has the next init. line:
This addaction ["Purchase cars","/cardealer/buycar1.sqs"];
The Script:
cardealer1 removeaction 0;
cardealer1 addaction ["Buy Lincoln LS, 500$","/cardealer/Licoln.sqs"];
cardealer1 addaction ["Buy Motorcycle, 180$","/cardealer/Motorcycle.sqs"];
cardealer1 addaction ["Buy Red Vespa, 140$","/cardealer/Redvespa.sqs"];
cardealer1 addaction ["Buy Blue Vespa, 140$","/cardealer/Bluevespa.sqs"];
cardealer1 addaction ["Buy Red Vespa, 140$","/cardealer/Redvespa.sqs"];
cardealer1 addaction ["Buy Trabant, 180$","/cardealer/Trabant.sqs"];
cardealer1 addaction ["Buy Sport Car, 360$","/cardealer/Sportcar.sqs"];
then so these actions wont stay, and you're back again to the main "Purchase Cars" action as in above, i made a small trigger next to the car dealer about Axis a:3 and Axis b: 3, whice circles the dealer.
something like this:
-Activated By: The Player
-When Not present
-Repeatably
Condition: player distance cardealer1 >1
Activation: cardealer1 exec "/cardealer/returntonormal.sqs"
the script:
cardealer1 removeaction 0
cardealer1 removeaction 1
cardealer1 removeaction 2
cardealer1 removeaction 3
cardealer1 removeaction 4
cardealer1 removeaction 5
cardealer1 removeaction 6
cardealer1 addaction ["Purchase Cars","/Cardealer/buycar1.sqs"];
maybe im breaking my head over here, but can someone please tell me what i did wrong, or maybe even let me know of an easier possibility.
:whistle:
-
It seems with your trigger set up is that the following happens:
Start
The options are available
Depending on where the player starts then they may just disappear
If the player is in the area then he can use the options, however if he moves out they will disappear.
What you probably want is another trigger which is when the player is present in the area and then activate the "buycar1.sqs"
Also, you might want to make changes to the scripts by adding labels.
Eg. buystart = this addaction ["Purchase cars","/cardealer/buycar1.sqs"]and then use this to shut it:
this removeaction buystartThat might help is become mroe organised.
Just some thoughts. :)
-=GC=-Fungus1999
-
thanks, it didnt fix to whole problem :dunno:, but it helped and got me trough guidelines.
:clap: so i did it! thank you for helping.