First of all, I don't if this is the right section, so, if it is wrog please meve it.
Well, I should do a cleo script that put the aerobrakes to a car.
The aerobrakes are the rear door and when you press spacebar + back, the car should stop in a short space and the aerobrakes should open, and when you leave the keys, (or when the car is stopped) the aerobrakes should close.
I tryed do do a script and the doors open, but don't close.
Other think, I would like that you can choose the car writing the ID of te car in an .ini file.
Here is my script:
Code:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027} {$CLEO .cs}
//-------------MAIN--------------- 0000: NOP
:NONAME_2 wait 10 if Player.Defined($PLAYER_CHAR) else_jump @NONAME_222 if or Actor.DrivingVehicleType($PLAYER_ACTOR, #PREMIER) else_jump @NONAME_222 03C0: 0@ = actor $PLAYER_ACTOR car 02E3: 1@ = car 0@ speed if and 1@ > 16.35 00E1: player 0 pressed_key 6 00E1: player 0 pressed_key 14 else_jump @NONAME_222 if not Car.Wrecked(0@) else_jump @NONAME_229 0657: car 0@ open_componentA 4 0657: car 0@ open_componentA 5 wait 500 if and 00E1: player 0 pressed_key 6 00E1: player 0 pressed_key 14 else_jump @NONAME_2 if and 81F3: not car 0@ in_air 81F4: not car 0@ flipped else_jump @NONAME_2 if 4@ > 50.0 else_jump @NONAME_2 4@ -= 30.0 Car.SetSpeedInstantly(0@, 4@) jump @NONAME_2
:NONAME_222 jump @NONAME_2
:NONAME_229 Car.RemoveReferences(0@)
PLEASE HELP!!!!!!
Threepwood Moderator
Number of posts : 469 Warning : Points : Registration date : 2008-06-04
I suggest you not to set players car speed. IIRC it doesn't work good. But what works good - set player cars drag coefficient! 088B: set_car 0@ form_drag_multiplier_to 0.1 Its more realistic as it does what speedbrakes do. For the doors: 068A: set_car 0@ repair_componentA 4 068A: set_car 0@ repair_componentA 5 does the trick to close.
hth
axel Pro
Number of posts : 254 Warning : Points : Registration date : 2008-02-29
Subject: Re: [ HELP | CLEO ] Script Thu Sep 04, 2008 12:05 am
Could you write the modified script?
Threepwood Moderator
Number of posts : 469 Warning : Points : Registration date : 2008-06-04
Subject: Re: [ HELP | CLEO ] Script Thu Sep 04, 2008 12:20 am
Test it please and test the settings for the drag, you willhave to tune them fine!
Code:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027} {$CLEO .cs}
//-------------MAIN--------------- 0000: NOP
:NONAME_2 0001: wait 0 ms 00D6: if 0256: player $PLAYER_CHAR defined 004D: jump_if_false @NONAME_2 00D6: if 00DD: actor $PLAYER_ACTOR driving_car_with_model #PREMIER 004D: jump_if_false @NONAME_2 03C0: 0@ = actor $PLAYER_ACTOR car 02E3: 1@ = car 0@ speed 00D6: if and 0021: 1@ > 16.35 00E1: player 0 pressed_key 6 00E1: player 0 pressed_key 14 004D: jump_if_false @NONAME_2 0002: jump @NONAME_3
:NONAME_3 0657: car 0@ open_componentA 4 0657: car 0@ open_componentA 5 0001: wait 500 ms 00D6: if and 00E1: player 0 pressed_key 6 00E1: player 0 pressed_key 14 004D: jump_if_false @NONAME_215 00D6: if and 81F3: not car 0@ in_air 81F4: not car 0@ flipped 004D: jump_if_false @NONAME_215 00D6: if 0021: 4@ > 50.0 004D: jump_if_false @NONAME_215 088B: set_car 0@ form_drag_multiplier_to 4.1 0002: jump @NONAME_3
:NONAME_215 068A: set_car 0@ repair_componentA 4 068A: set_car 0@ repair_componentA 5 01C3: remove_references_to_car 0@ // Like turning a car into any random car 0002: jump @NONAME_2
axel Pro
Number of posts : 254 Warning : Points : Registration date : 2008-02-29
Subject: Re: [ HELP | CLEO ] Script Thu Sep 04, 2008 1:42 am
Thanks, it works, but, for exampla, when you damage an aerobrake, whaen you start brakeing it is still damagd, but when it is close, it is repaired, it is possible to close it without repairing?
Second thing how can I set the car from a file .ini ad not from the script, like °PREMIER in this case?
THANK YOU SO MUCH
Threepwood Moderator
Number of posts : 469 Warning : Points : Registration date : 2008-06-04
Subject: Re: [ HELP | CLEO ] Script Thu Sep 04, 2008 1:59 am
Dunno much about reading ini's, but there is good help with that at sannybuilder.com. And for the repair thing: IDK how to close doors else, sorry
axel Pro
Number of posts : 254 Warning : Points : Registration date : 2008-02-29
Subject: Re: [ HELP | CLEO ] Script Thu Sep 04, 2008 2:17 am
I will see at sannybuilder
THANKS
VladyF Administrator
Number of posts : 3414 Age : 30 Location : Romania Navodari Warning : Personalized field : Nope Points : Registration date : 2008-01-18
Subject: Re: [ HELP | CLEO ] Script Thu Sep 04, 2008 2:22 am
**Moved Topic from WIP to Help section **
Nice idea and about closing doors all the CLEOs it repair your damaged parts or at least at the ones I've used :p
Varinder S. High Carbs
Number of posts : 949 Age : 33 Location : Jalandhar,Punjab,INDIA Warning : Points : Registration date : 2008-05-22
Subject: Re: [ HELP | CLEO ] Script Thu Sep 04, 2008 9:13 am
gosh! i dont know shit about scripting! :goof:
peddig New Commer
Number of posts : 30 Age : 40 Location : Germany Warning : Points : Registration date : 2008-08-31
Just click the new topic button at the bottom of this page
Solved : Topic Locked
axel Pro
Number of posts : 254 Warning : Points : Registration date : 2008-02-29
Subject: Re: [ HELP | CLEO ] Script Fri Nov 28, 2008 2:35 am
Ok...this is the updated version and seems to work, if you press "CTRL" you have the boost, while if you press "BACK" + "SPACE" you have the aerobrakes:
Code:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
{$VERSION 3.1.0027} {$CLEO .cs}
//-------------MAIN--------------- 0000: NOP
:NONAME_2 wait 10 if Player.Defined($PLAYER_CHAR) else_jump @NONAME_2 if or Actor.DrivingVehicleType($PLAYER_ACTOR, #URANUS) Actor.DrivingVehicleType($PLAYER_ACTOR, -1) else_jump @NONAME_2 03C0: 0@ = actor $PLAYER_ACTOR car
:NONAME_56 wait 1
:NONAME_60 wait 10 if Player.Defined($PLAYER_CHAR) else_jump @NONAME_60 if Actor.InCar($PLAYER_ACTOR, 0@) else_jump @NONAME_56 if 00E1: player 0 pressed_key 17 else_jump @NONAME_269 02E3: 4@ = car 0@ speed if 4@ > 15.0 else_jump @NONAME_193 4@ *= 1.3 if 4@ > 200.35 else_jump @NONAME_203 4@ = 200.35 jump @NONAME_203
:NONAME_193 4@ += 5.0
:NONAME_203 if and 81F3: not car 0@ in_air 81F4: not car 0@ flipped else_jump @NONAME_60 wait 1 if 3@ == -1 else_jump @NONAME_250 wait 1
But I don't understand why whaen I spawn a car it works, I destroy it and spawn another ine and it doesn't workwhile to a friend of mine, it doesn't work...why?? What is wrong??