Turn indicators [CLEO4/SA/REL]
Posted 08 January 2011 - 01:40 AM Edited by Den_spb, 08 January 2012 - 01:48 PM.
This script allows to use turn indicators while driving automobile or motobike. Coronas are created at positions of headlights and back lights of vehicle, which are calculated automatically. So, you can use this script with all models of automobiles and motobikes, without additional files. If trailer is attached to automobile with enabled turn indicators, it will have enabled turn indicators too.
Version 1.1. Indicators work after player exit car until enter another car.
Version 2.0. AI-drivers can use indicators, no CJ only.
Version 2.1. Some bugs were fixed.
1.Download and install CLEO4 library from cleo.sannybuilder.com.
2.Put file turn_indicators.cs to cleo folder.
How to use:
Z - enable left indicators, C - enable right indicators, X - enable all indicators. Press this buttons again to disable indicators (in v.2 disable indicators by Shift button).
Script was made for game version 1.0 US. Work with other versions of game is not guaranteed.
Posted 08 January 2011 - 01:44 PM
|Is it possible to make them blink? Great mod BTW.|
[email protected] > 1000 // duration of flash + pause between flashes (ms)
[email protected] = 0
[email protected] < 500 // duration of flash in ms
|is it work with modded vehicles ?|
Posted 08 January 2011 - 03:56 PM
Now it would be cool to see other cars using indicators in traffic - and maybe when both indicators together would still continue flickering when you leave the car.
Nice job, really well done - thanks!
Posted 08 January 2011 - 04:47 PM
|Now it would be cool to see other cars using indicators in traffic - and maybe when both indicators together would still continue flickering when you leave the car.|
Posted 08 January 2011 - 04:57 PM
Posted 22 January 2011 - 01:51 AM
Posted 01 February 2011 - 02:54 PM
Posted 01 March 2011 - 12:37 AM
|QUOTE (Neova @ Feb 1 2011, 14:54)|
|Great job but can you make it so the AI cars also use the indicators?|
+1 for this.
Also 'white' reversing lights too ? And a 'beep' if its a truck or heavy vehicle reversing ?
Posted 30 October 2011 - 11:10 PM
Now turn signals can be use at AI-cars.
Posted 01 November 2011 - 01:18 PM Edited by Darecki, 01 November 2011 - 01:21 PM.
I understand that it is possible to change the position of indicators in the script?
Posted 01 November 2011 - 01:34 PM
Darecki, indicators are created at points of headlights and tail lights placing - as in previous versions.
Posted 01 November 2011 - 08:23 PM
Posted 06 November 2011 - 10:25 AM
Posted 06 November 2011 - 06:36 PM
How to change buttons:
1.Put file turn_indicators2.txt into cleo folder
2.Open txt-file by Sanny Builder (File-Open)
3.Change numbers of buttons (90, 88, 67) here
0AB0: key_pressed 90 // Z
0_StatusOfPlayerCar = 1_Left
0AB0: key_pressed 88 // X
0_StatusOfPlayerCar = 1_Both
0AB0: key_pressed 67 // C
0_StatusOfPlayerCar = 1_Right
0AB0: key_pressed 16 // Shift
0_StatusOfPlayerCar = 0
4.Compile script after editing (Run-Compile).
Darecki, you can change offsets of lights yourself. For example, increase standard X offsets to 1.0 and Z offsets to 0.5:
0A8E: 0_Adress = 0_VehicleStruct + 0x22 // int
0A8D: 0_Adress = read_memory 0_Adress size 2 virtual_protect 0 //model index
0_Adress *= 4
0_Adress += 0xA9B0C8
0A8D: 0_Adress = read_memory 0_Adress size 4 virtual_protect 0 //CModel
0_Adress += 0x5C
0A8D: 0_Adress = read_memory 0_Adress size 4 virtual_protect 0 //vehicle struct
0A8D: 0_FrontLightX = read_memory 0_Adress size 4 virtual_protect 0 //x offset
0_Adress += 4
0A8D: 0_FrontLightY = read_memory 0_Adress size 4 virtual_protect 0 //y offset
0_Adress += 4
0A8D: 0_FrontLightZ = read_memory 0_Adress size 4 virtual_protect 0 //z offset
0_Adress += 4
0A8D: 0_BackLightX = read_memory 0_Adress size 4 virtual_protect 0 //x offset
0_Adress += 4
0A8D: 0_BackLightY = read_memory 0_Adress size 4 virtual_protect 0 //y offset
0_Adress += 4
0A8D: 0_BackLightZ = read_memory 0_Adress size 4 virtual_protect 0 //z offset
0_FrontLightX == 0.0
0_FrontLightX = 0.15
0_BackLightX == 0.0
0_BackLightX = 0.15
0_FrontLightX += 1.0 // NEW COMMANDS HERE
0_BackLightX += 1.0
0_FrontLightZ += 0.5
0_BackLightZ += 0.5
Posted 06 November 2011 - 08:25 PM
Posted 07 November 2011 - 09:24 AM
Sometimes, they don't indicate when turning (I guess thats good, not all drivers do LOL) <-- These guys need to be chased
I can see the indicator texture/particle through the car sometimes ..
What particle is the effect based on ? It's quite large on my screen. Maybe make its own particle in particle.txd and make it smaller? So everyone can have the perfect size, but not effect any other particles in the game?
Posted 07 November 2011 - 01:33 PM
|but sometimes it crashes also.|
If you have right versions of game and cleo and game is still crashing, install plugin ScmLog from cleo.sannybuilder.com. File scmlog.txt will be created after crashing - send it me.
|Sometimes, they don't indicate when turning|
|I can see the indicator texture/particle through the car sometimes ..|
|Maybe make its own particle in particle.txd and make it smaller?|
|0AA5: 0x6FC580 21 21 1 0 0x41700000 0 0x3FC00000 0 0 0 0 0 attach_corona_flare 0 type 0 0x43160000 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_vehicle_struct 0_VehicleStruct unical_number 0_UnicalNumberOfCorona|
Here 0.3 is radius of corona. You can change it yourself.
Posted 07 November 2011 - 06:42 PM
Is it based on coronastar from particle.txd? What one do you use? As you can see, my indicator looks nothing like yours ..
Posted 07 November 2011 - 08:50 PM
|Is it based on coronastar from particle.txd?|
My coronas different from standard coronas because I installed other effects.
Posted 08 November 2011 - 02:13 AM
Posted 09 November 2011 - 07:23 AM
One more question; what timecyc.dat do you use ^^
Posted 09 November 2011 - 09:49 AM
|One more question; what timecyc.dat do you use|
Posted 11 November 2011 - 10:42 PM
I found another bug; don't know if this is your scripts fault or not ..
But I have the Packer script, that has up to four cars on the Packer; and those vehicles have there indicators going as well lol
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users