Home   Help Search Login Register  

Author Topic: A Problem with a car seller  (Read 893 times)

0 Members and 1 Guest are viewing this topic.

Offline RolsRois

  • Members
  • *
  • I'm not sure of who i am anymore
    • Rambm Workshop
A Problem with a car seller
« 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:
Rambm Workshop, A New way of playing OFP
http://www.freewebs.com/rambm/
yes its on freewebs! Got a problem?

Offline Gcfungus

  • Members
  • *
Re: A Problem with a car seller
« Reply #1 on: 31 Jul 2008, 11:13:25 »
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.
Code: [Select]
buystart = this addaction ["Purchase cars","/cardealer/buycar1.sqs"]and then use this to shut it:
Code: [Select]
this removeaction buystartThat might help is become mroe organised.

Just some thoughts. :)
-=GC=-Fungus1999
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline RolsRois

  • Members
  • *
  • I'm not sure of who i am anymore
    • Rambm Workshop
Re: A Problem with a car seller
« Reply #2 on: 31 Jul 2008, 15:04:57 »
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.
« Last Edit: 31 Jul 2008, 15:10:37 by RolsRois »
Rambm Workshop, A New way of playing OFP
http://www.freewebs.com/rambm/
yes its on freewebs! Got a problem?