Home   Help Search Login Register  

Author Topic: Cars Wreck  (Read 3930 times)

0 Members and 1 Guest are viewing this topic.

LTS-1GT

  • Guest
Cars Wreck
« on: 25 Dec 2005, 07:05:16 »
Hello all, Merry Christmas.

This is LTS-1GT. I am looking for script about cars wreck, anyone know?  

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Cars Wreck
« Reply #1 on: 25 Dec 2005, 18:31:02 »
can you be a bit more vague please, so you can really help us answer your query
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

LTS-1GT

  • Guest
Re:Cars Wreck
« Reply #2 on: 25 Dec 2005, 23:52:58 »
Hi Terox, I mean looking for script about cars wreck.  I am mission maker for coop multiplayer. My mission file name call "Steal the cars".  I am trying make for steal enemy cars to escape freedom.  I need the script for cars wreck, try anyone don't get cars wreck more than 1 or 2 mission will failed. Try to be careful , do not damage any them. Sorry my english bad, hope you understand.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Cars Wreck
« Reply #3 on: 29 Dec 2005, 14:46:37 »
do you want

something to wreck cars
something to stop damage

what

try to explain what you want the script to do
« Last Edit: 29 Dec 2005, 14:47:29 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

LTS-1GT

  • Guest
Re:Cars Wreck
« Reply #4 on: 29 Dec 2005, 18:09:37 »
Yes, something cars wreck like accident you the hit tree, hit anywhere house fence, or enemy spot shoot you in car were stole  when you drive cars run  too fast escape to freedom.  If the car has damage window, flat tire can't move it  that is car wreck  more than 1 or 2  cars wreck so  mission could be failed. Steal enemy cars and drive to be careful do not hurt them.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Cars Wreck
« Reply #5 on: 29 Dec 2005, 18:21:58 »
OK......my tentative translation:

He wants to know how to check whether you have wrecked more than x number of vehicles.......if so........mission fail.

I think:   :P

Happy Hogmanay.   :beat:


Planck
I know a little about a lot, and a lot about a little.

Offline Ding

  • Contributing Member
  • **
  • Jurassic Park
Re:Cars Wreck
« Reply #6 on: 29 Dec 2005, 18:34:01 »
you could do it yourself using Eventhandlers or maybe putting the dammage command to good use
"If I remain lost and die on a cross, atleast I wasn't born in a manger"

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Cars Wreck
« Reply #7 on: 29 Dec 2005, 22:54:47 »
OK......my tentative translation:

He wants to know how to check whether you have wrecked more than x number of vehicles.......if so........mission fail.

I think:   :P

Happy Hogmanay.   :beat:


Planck

Ok, well the system would incorporate a trigger counting the damage of a set of vehicles contained in an array

basically

INIT.SQS
;; add the name of every car to the following array that you need to monitor
;; in this example, i called them car1, car2 etc etc
tx_Veh = [Car1,Car2,Car3,Car4,Car5]

MISSION EDITOR
Create a once only trigger
Condition:{count canmove _x == 0}foreach tx_vehicles
On Activation: [] exec wreckedveh.sqs



basically the above condition when reached will activate a script
called "wreckedVeh.sqs"
(The trigger waits until all the cars in the array can no longer move)
Create a script called wreckedVeh.sqs do run whatever code you require when the condition is reached

{count canmove _x == 0}foreach tx_vehicles
the canmove command returns whether or not a vehicle can move, based on the damage it has suffered, rather than fuel etc



other conditions you could use are
Condition:({alive _x }count tx_vehicles==0)

for completely destroyed vehicles



« Last Edit: 29 Dec 2005, 23:05:41 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

LTS-1GT

  • Guest
Re:Cars Wreck
« Reply #8 on: 31 Dec 2005, 09:07:27 »
Hi Terox, thank for make nice script surprise me. I don't understand what tx mean?  Each cars I name them:  EastCar1,  EastCar2, EastCar3, EastCar4, EastCar5.

Hmm what is the name code I need for wreckedVeh.sqs files? Is this only 1 file script?

{count canmove _x == 0}foreach tx_vehicles

Why don't you try help me make list script for wrechedVeh.sqs, send it to me yangtong72@hotmail.com, need zip it or winrar before you send.

LTS-1GT

  • Guest
Re:Cars Wreck
« Reply #9 on: 31 Dec 2005, 11:12:46 »
Hmmm Terox, this code: {count canmove _x == 0}foreach tx_vehicles doesn't work, it's give me bad error say: Invalid number expression from condition.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Cars Wreck
« Reply #10 on: 31 Dec 2005, 12:35:16 »
oops sorry silly syntax erros, use the following

to be honest you dont even need a trigger, it would be more efficient if the server simply ran a slow looping script of say 5 second delay between each loop
Use the following

INIT.SQS
tx_EastLose = false
?(local server):[] exec "CarMonitor.sqs"


MISSION EDITOR
1) Create a gamelogic
Name it  "Server"    (without the speech marks)

2) Create your end trigger, have its condition
tx_EastLose
and have it execute whatever script you want to run for the outro etc in the On Activation field


CARMONITOR.SQS
Quote
~3
_Ecars =  [EastCar1,EastCar2,EastCar3,EastCar4,EastCar5]
#START
~5
if({canmove _x}count _Ecars>0)then{goto "START"}

#WRECKED
hint "Add commands here for whatever you need to do, when all of the cars are wrecked"
;;;; eg
tx_EastLose = true; Publicvariable "tx_EastLose"
exit








very basically
the server will run a local script, checking every 5 seconds to see how many vehicles listed in _Ecars can move, based on their damage (not fuel)
When none of the cars are able to move, it will stop looping and start reading the code under the "Wrecked" label

Under this label, baring in mind, only the server will run this code, you will need to Publicvariable a boolean to true, and have a trigger, your end trigger waiting on that boolean condition


tx_  is a tag i use for all my global variables, it simply stops any conflicts with hidden OFP reserved variables and any badly tagged addons

« Last Edit: 31 Dec 2005, 13:03:12 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

LTS-1GT

  • Guest
Re:Cars Wreck
« Reply #11 on: 31 Dec 2005, 19:11:25 »
Hmmm, I am so confuse not clear understand well: Can you explain example for hint? What is the commands to add, how? What to say in hint?

 #WRECKED
hint "Add commands here for whatever you need to do, when all of the cars are wrecked"
;;;; eg
tx_EastLose = true; Publicvariable "tx_EastLose"
exit

About Create my end trigger, have its condition
tx_EastLose?

Ok I create trigger for End#4
condition: tx_EastLose is that all you need?


LTS-1GT

  • Guest
Re:Cars Wreck
« Reply #12 on: 31 Dec 2005, 22:59:43 »
Hi Terox, I have problem same time.

It give me error again here:

'if|#|({canmove _}count _Ecars>0)then{goto "START"}': Error Unknow operator

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Cars Wreck
« Reply #13 on: 31 Dec 2005, 23:16:45 »
Shouldn't that be:

if({canmove _x}count _Ecars>0)then{goto "START"}


Planck
« Last Edit: 31 Dec 2005, 23:17:04 by Planck »
I know a little about a lot, and a lot about a little.

LTS-1GT

  • Guest
Re:Cars Wreck
« Reply #14 on: 01 Jan 2006, 03:04:28 »
Oop I forget add x post here message, but it is still problem not working. Planck