GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
[Help] cleo created lighting EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
[Help] cleo created lighting EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
[Help] cleo created lighting EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
[Help] cleo created lighting EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
[Help] cleo created lighting EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
[Help] cleo created lighting EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
[Help] cleo created lighting EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
[Help] cleo created lighting EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
[Help] cleo created lighting EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar


You are not connected. Please login or register

[Help] cleo created lighting

3 posters

Go down  Message [Page 1 of 1]

1[Help] cleo created lighting Empty [Help] cleo created lighting Thu Mar 19, 2009 12:07 pm

Kotton



sup big.. damn nice site you kats have put together - all the tutorials are out-freakn-standing, mad propz-

I'm modeling a super yacht atm, and before I get it in game, I'd like to create the cleo script for it- my dilemma, I want to attach lights to it, however, I'm unable to find any list of specific lights for SA - if possible, could you point me in the right direction please? much appreciated-

current yacht model-
[Help] cleo created lighting 3d390e30007807

example of what I need to do-
[Help] cleo created lighting 2e845230121697

2[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Mar 20, 2009 12:22 am

gtasbigfoot

gtasbigfoot
Admin

There exist in San Andreas searchlights, spotlights, and effect created ones.
(flash lights), (2dfx light), and particles.

I will list the light types, and give a description:


- Searchlights can be created with the opcode 06B1 and then you can use arrays to control lots of them, however I did they MAY not look so good-looking on a yacht, but you can try if you wanna, and attach it to the yacht with opcode 06C1

- Flash lights are flashes, there kind of similar to searchlights, although without the "search" they can be created with this opcode:


Code:

09E5: create_flash_light_at X.Y.Z RGB_mask 255 255 255 radius 200.0


- 2dfx light - it's possible There are two opcodes, though, this way will need a lot of math coding to keep it on the car, since there is no attach to car opcode:


Code:

024F: create_corona_with_radius 0.2 type 2 lensflares 0 with_color 255 255 255 at 1@ 2@ 3@




Code:

04D5: create_corona_at 1@ 2@ 3@ radius 0.1 type 2 flare 2 RGB 255 255 255



--
I remember talking many months ago about this, with Alex, AFAIR, the best way to do is with the searchlights.

http://gtamodding.com

3[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Mar 20, 2009 1:22 am

Kotton



thanks for the reply big- appreciato

I've experimented with the flash_light and the results are not quite what I was lookn for - but I'll definitely fiddle with the search lights and your other suggests.. ty

edit- tried the searchlights and they're seemingly hard to control - no matter what offset I give them (even 0.0 0.0 0.0), they still act as if the starting point is far away and the end result is the beam of light shinning thru the vehicle instead of starting at the vehicle and shinning out - I'm also having a hard time keeping it still, I've stored the vehicle coords to an offset and assigned that as it's target, but they still move wrong when the vehicle does..

is there a memory address for vehicle lights that I could utilize? I've browsed gtamodding but didn't see anything.. the vehicle lights have the desired strength and I'm sure they're not meant to move, so in essence, they would probably be perfect for this application - thx for your time on this big-

btw.. float me your affiliate button and I'll return the favor at the Shop-

4[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Mar 20, 2009 5:01 am

gtasbigfoot

gtasbigfoot
Admin

The searchlights may act like this when they are not scripted
complety correct, as I remebmer telling ZAZ & James, time ago.

Did you try storing co-ordinates from the vehicle it's self, and then
letting the lights follow, but a little down so it looks like there refelecting on the water?

--
Umm, only function addresses which exist are the following:



Code:

004934f0   _attachSearchlight


Example mission code of how the searchlights work:


Code:


:Area69SL
03A4: name_thread "Area69SL"
0050: gosub @missionstart2
00D6: if 
0112:  wasted_or_busted
004D: jump_if_false @end2
0050: gosub @MissionFailed2                   

:end2
0050: gosub @SearchLights6
004E: end_thread

:missionstart2
0004: $ONMISSION =  1
0007: 71@ = 108.51
0007: 78@ = 1917.268
0007: 85@ = 17.63
0007: 92@ = 135.323
0007: 99@ = 1917.776
0007: 106@ = 18.71 

/////////
0007: 72@ = 180.018
0007: 79@ = 1904.214
0007: 86@ = 17.255
0007: 93@ = 243.707
0007: 100@ = 1903.543 
0007: 107@ = 18.639

/////////
0007: 73@ = 239.0798
0007: 80@ = 1904.087
0007: 87@ = 16.899
0007: 94@ = 188.371
0007: 101@ = 1905.376
0007: 108@ = 16.825

/////////
0007: 74@ = 166.119
0007: 81@ = 1857.384
0007: 88@ = 16.764
0007: 95@ = 276.669
0007: 102@ = 1856.339
0007: 109@ = 16.671

/////////
0007: 75@ = 191.28
0007: 82@ = 1822.46
0007: 89@ = 16.83
0007: 96@ = 252.37
0007: 103@ = 1821.89 
0007: 110@ = 17.04

/////////
0007: 76@ = 138.07
0007: 83@ = 1823.01
0007: 90@ = 16.88
0007: 97@ = 105.1
0007: 104@ = 1867.21 
0007: 111@ = 16.97

/////////
0007: 77@ = 192.9
0007: 84@ = 1809.56
0007: 91@ = 16.8
0007: 98@ = 144.2
0007: 105@ = 1812.52
0007: 112@ = 16.78
/////////

// 7 total
0006: 133@ = 0

:7lights
00D6: if
001B:  7 > 133@
004D: jump_if_false @SearchLights_Load
0006: 802@(133@,7i) = 0
000A: 133@ += 1
0002: jump @7lights

:SearchLights_Load
0247: request_model #A51_SPOTBULB
0247: request_model #A51_SPOTHOUSING
0247: request_model #A51_SPOTBASE
038B: load_requested_models

:SearchLights_Load2
00D6: if or
8248:  not model #A51_SPOTBULB available
8248:  not model #A51_SPOTHOUSING available
8248:  not model #A51_SPOTBASE  available
004D: jump_if_false @SearchLights_Create
0001: wait 0 ms
0002: jump @SearchLights_Load2


:SearchLights_Create
06B1: 36@ = create_searchlight_at 261.97 1808.07 36.05 radius 0.5 target 71@ 78@ 85@ radius 10.5
029B: 43@ = init_object #A51_SPOTBULB at 103.946 1901.047 36.246
029B: 57@ = init_object #A51_SPOTHOUSING at 103.946 1901.047 36.246
029B: 58@ = init_object #A51_SPOTBASE at 103.946 1901.047 36.246
06CA: attach_searchlight 36@ to_tower 58@ to_housing 57@ to_bulb 43@ with_offset 0.0 1.181 0.768
071F: set_object 43@ health_to 5000
0875: unknown_object 43@ flag 1
066D: 50@ = attach_particle "SHOOTLIGHT" to_object 43@ with_offset 0.0 1.181 0.768 flag 1
06B1: 37@ = create_searchlight_at 103.887 1901.057 35.723 radius 0.5 target 72@ 79@ 86@ radius 10.5
029B: 44@ = init_object #A51_SPOTBULB at 161.962 1933.043 36.246
029B: 59@ = init_object #A51_SPOTHOUSING at 161.962 1933.043 36.246
029B: 60@ = init_object #A51_SPOTBASE at 161.962 1933.043 36.246
06CA: attach_searchlight 37@ to_tower 60@ to_housing 59@ to_bulb 44@ with_offset 0.0 1.181 0.768
071F: set_object 44@ health_to 5000
0875: unknown_object 44@ flag 1
066D: 51@ = attach_particle "SHOOTLIGHT" to_object 44@ with_offset 0.0 1.181 0.768 flag 1
06B1: 38@ = create_searchlight_at 164.228 1837.892 34.05 radius 0.5 target 73@ 80@ 87@ radius 10.5
029B: 45@ = init_object #A51_SPOTBULB at 233.486 1934.789 36.246
029B: 61@ = init_object #A51_SPOTHOUSING at 233.486 1934.789 36.246
029B: 62@ = init_object #A51_SPOTBASE at 233.486 1934.789 36.246
06CA: attach_searchlight 38@ to_tower 62@ to_housing 61@ to_bulb 45@ with_offset 0.0 1.181 0.768
071F: set_object 45@ health_to 5000
0875: unknown_object 45@ flag 1
066D: 52@ = attach_particle "SHOOTLIGHT" to_object 45@ with_offset 0.0 1.181 0.768 flag 1
06B1: 39@ = create_searchlight_at 261.97 1808.07 34.05 radius 0.5 target 74@ 81@ 88@ radius 10.5
029B: 46@ = init_object #A51_SPOTBULB at  267.116 1895.241 36.246
029B: 63@ = init_object #A51_SPOTHOUSING at 267.116 1895.241 36.246
029B: 64@ = init_object #A51_SPOTBASE at 267.116 1895.241 36.246
06CA: attach_searchlight 39@ to_tower 64@ to_housing 63@ to_bulb 46@ with_offset 0.0 1.181 0.768
071F: set_object 46@ health_to 5000
0875: unknown_object 46@ flag 1
066D: 53@ = attach_particle "SHOOTLIGHT" to_object 46@ with_offset 0.0 1.181 0.768 flag 1
06B1: 40@ = create_searchlight_at 266.713 1894.979 34.139 radius 0.5 target 75@ 82@ 89@ radius 10.5
029B: 47@ = init_object #A51_SPOTBULB at 262.145 1807.62 36.246
029B: 65@ = init_object #A51_SPOTHOUSING at 262.145 1807.62 36.246
029B: 66@ = init_object #A51_SPOTBASE at 262.145 1807.62 36.246
06CA: attach_searchlight 40@ to_tower 66@ to_housing 65@ to_bulb 47@ with_offset 0.0 1.181 0.768
071F: set_object 47@ health_to 5000
0875: unknown_object 47@ flag 1
066D: 54@ = attach_particle "SHOOTLIGHT" to_object 47@ with_offset 0.0 1.181 0.768 flag 1
06B1: 41@ = create_searchlight_at 233.067 1934.892 33.139 radius 0.5 target 76@ 83@ 90@ radius 10.5
029B: 48@ = init_object #A51_SPOTBULB at 166.003 1849.937 36.246
029B: 67@ = init_object #A51_SPOTHOUSING at 166.003 1849.937 36.246
029B: 68@ = init_object #A51_SPOTBASE at 166.003 1849.937 36.246
06CA: attach_searchlight 41@ to_tower 68@ to_housing 67@ to_bulb 48@ with_offset 0.0 1.181 0.768
071F: set_object 48@ health_to 5000
0875: unknown_object 48@ flag 1
066D: 55@ = attach_particle "SHOOTLIGHT" to_object 48@ with_offset 0.0 1.181 0.768 flag 1
06B1: 42@ = create_searchlight_at 161.513 1932.982 35.391 radius 0.5 target  77@ 84@ 91@ radius 12.5
029B: 49@ = init_object #A51_SPOTBULB at 113.439 1814.405 36.246
029B: 69@ = init_object #A51_SPOTHOUSING at 113.439 1814.405 36.246
029B: 70@ = init_object #A51_SPOTBASE at 113.439 1814.405 36.246
06CA: attach_searchlight 42@ to_tower 70@ to_housing 69@ to_bulb 49@ with_offset 0.0 1.181 0.768
071F: set_object 49@ health_to 5000
0875: unknown_object 49@ flag 1
066D: 56@ = attach_particle "SHOOTLIGHT" to_object 49@ with_offset 0.0 1.181 0.768 flag 1
0050: gosub @SL_path

:SearchLights2
0006: 133@ = 0

:SearchLights3
00D6: if
001B:  7 > 133@
004D: jump_if_false @SearchLights5
00D6: if
0039:  802@(133@,7i) == 0
004D: jump_if_false @SearchLights4
00D6: if
03CA:  object 43@(133@,7i) exists
004D: jump_if_false @SearchLights4
071E: get_object 43@(133@,7i) health_to 803@
00D6: if
001B:  5000 > 803@
004D: jump_if_false @SearchLights4
00D6: if
06B3:  searchlight 36@(133@,7i) active
004D: jump_if_false @SearchLights4
06B2: destroy_searchlight 36@(133@,7i)
064F: remove_references_to_particle 50@(133@,7i)
0006: 802@(133@,7i) = 1

:SearchLights4
000A: 133@ += 1
0002: jump @SearchLights3

:SearchLights5
00D6: if
00FE:  actor $PLAYER_ACTOR sphere 0 in_sphere 213.8287 1879.4432 13.1406 radius 300.0 350.0 300.0 
004D: jump_if_false @OORange
0001: wait 0 ms
0002: jump @SearchLights2

:OORange
0051: return

:MissionFailed2
0051: return

:SearchLights6
00D6: if
001B:  7 > 133@
004D: jump_if_false @SearchLights7 
06B2: destroy_searchlight 36@(133@,7i)
0108: destroy_object 43@(133@,7i)
000A: 133@ += 1
0002: jump @SearchLights6

:SearchLights7
0108: destroy_object 57@
0108: destroy_object 58@
0108: destroy_object 59@
0108: destroy_object 60@
0108: destroy_object 61@
0108: destroy_object 62@
0108: destroy_object 63@
0108: destroy_object 64@
0108: destroy_object 65@
0108: destroy_object 66@
0108: destroy_object 67@
0108: destroy_object 68@
0108: destroy_object 69@
0108: destroy_object 70@
0249: release_model  #A51_SPOTBULB
0249: release_model  #A51_SPOTHOUSING
0249: release_model  #A51_SPOTBASE
0004: $ONMISSION =  0
00D8: mission_cleanup
0051: return

:SL_path
0006: 133@ = 0

:Path_3D_Math_Coords
00D6: if
001B:  7 > 133@
004D: jump_if_false @SLTC
00D6: if
06B3:  searchlight 36@(133@,7i) active
004D: jump_if_false @133add1
06B4: set_searchlight 36@(133@,7i) path_between 71@(133@,7f) 78@(133@,7f) 85@(133@,7f) and 92@(133@,7f) 99@(133@,7f) 106@(133@,7f) speed 0.32

:133add1
000A: 133@ += 1
0002: jump @Path_3D_Math_Coords

:SLTC
0051: return



btw.. float me your affiliate button and I'll return the favor at the Shop-

Спасибо!(means: "Thanks!" just in-case your not Russian) - Thank you for nice offer, though I have not got
much time to make one(affiliate) yet - May be I will soon... Our site is still not completely finished in the design, I mainly put it up, because many users on GTAForums, YouTube, always PM me asking questions, so I wanted to make a site for em', though many thanks - and your 3D skills and website are outstanding... Wink



Last edited by gtasbigfoot on Fri Mar 20, 2009 7:44 am; edited 1 time in total

http://gtamodding.com

5[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Mar 20, 2009 6:53 am

Kotton



maybe I'll make you one this weekend then Wink

that example looks like how it's used in the Main - here's my thread, I've only created one light so I can tweak it and get it working correctly.. then I would expand upon it - as you can see, I've taken the coords from the vehicle and made them my target, but for some reason the target moves around the vehicle as the vehicle moves- which is something I did not expect - I was under the impression that when I store the vehicle coords to an offset, they would always compute and read that exact location.. which would result in the light staying still even when the vehicle is moving Neutral

even still, when I create the searchlight at the vehicle 0 offset, shouldn't the light start at that offset and not elsewhere? or do I also need to get the vehicle coods and attach the light to those? did I just answer my own question? lol- I do that a lot lmao - that would make sense tho.. maybe it's not the target moving but the source urhrhr- also, I'm not worried about the water reflection, when all is said and done, the lights should be slightly underwater pointing away and angled somewhat down

Code:
:Yacht_1
0001: wait 0 ms
00D6: if
0256:  player $PLAYER_CHAR defined
004D: jump_if_false @Yacht_1
00D6: if and
00DF:  actor $PLAYER_ACTOR driving
0038:  $ONMISSION == 0
00DD:  actor $PLAYER_ACTOR driving_car_with_model #SENTINEL
004D: jump_if_false @Yacht_1
03C0: 0@ = actor $PLAYER_ACTOR car
00D6: if
0AB0:  key_pressed 107
004D: jump_if_false @Yacht_1
0407: store_coords_to 5@ 6@ 7@ from_car 0@ with_offset 5.0 0.0 0.0

:Yacht_2
0001: wait 0 ms
06C1: create_searchlight 4@ on_car 0@ with_offset 0.0 0.0 0.0 radius 0.5 target 5@ 6@ 7@ radius 3.0

:Yacht_3
0001: wait 1000 ms
00D6: if
8AB0:  not key_pressed 109
004D: jump_if_false @Yacht_4
00D6: if
00DF:  actor $PLAYER_ACTOR driving
004D: jump_if_false @Yacht_4
0002: jump @Yacht_3

:Yacht_4
0001: wait 0 ms
06B2: destroy_searchlight 4@
01C4: remove_references_to_object 0@ // This object will now disappear when the player looks away
0002: jump @Yacht_1

6[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Mar 20, 2009 11:49 am

gtasbigfoot

gtasbigfoot
Admin

- Yea, the example was written for main.scm(it's part of the MOD I did time ago), but all is needed is to change the model names with there ID's, it's written as a mission script, thus it's started through a starter pack.

--

- The offset is pointing to 5@ 6@ 7@, and the X is 5.0
so the light is following this, and since X = 5 about that -> 5.0 is only small so does not make a huge effect.


- It's very hard to the offset right when using searchlights on any vehicle.
You put the search light to the car at offset 0.0 0.0 0,0, this is OK, although you may want to play around with slightly more high values(0.0 1.2 1.0).

- BTW, the wait before you created the search light and the one after "Yacht_4" is generally not necessary, only the first wait in the script and(0001: wait 1000 ms) is, because the code is in a loop.



Code:

01C4: remove_references_to_object 0@ // This object will now disappear when the player looks away


There exist no object 0@, there only exist a car with this varible, car is not a object per say, like a pickup is. I think you meant to put 01C3 instead of 01C4.

- BTW, there is no need to remove the car reference after using the opcode 03C0, many people do not actually know this, but it's not 100% necessary to do this - to do so after using the 03C0, as it does not make the car *special*. As 03C0 just returns car's handle (it's index in vehicles pool).

--

Not sure if something like this would work better, never tried:


Code:

06C1: create_searchlight 1@ on_car 0@ with_offset 0.0 2.0 0.0 radius 0.01 target 0.0 0.0 0.0 radius 25.0
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset 20.0 20.0 0.5
0407: store_coords_to 14@ 15@ 17@ from_car 0@ with_offset -20.0 20.0 0.5
06B4: set_searchlight 1@ path_between 11@ 12@ 13@ and 14@ 15@ 17@ speed 0.4


I know if you do something like the following it's light show, only just a little to much.. It's just takes incurable amount of time to the offset right. It's all about the offset, which needs to be right.


Code:

0407: store_coords_to 2@ 3@ 4@ from_car 0@ with_offset 0.0 20.0 0.5
06C1: create_searchlight 1@ on_car 0@ with_offset 0.0 2.0 0.0 radius 0.01 target 2@ 3@ 4@ radius 25.0
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset -3.0 -2.0 0.5
0407: store_coords_to 14@ 15@ 17@ from_car 0@ with_offset -3.0 0.0 0.5
06B4: set_searchlight 1@ path_between 11@ 12@ 13@ and 14@ 15@ 17@ speed 15.27984

http://gtamodding.com

7[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Mar 20, 2009 2:50 pm

Kotton



thanks for the input big- I'll definitely try your suggests in a few.. I noticed you changed the starting radius to 0.01 *smacks head* doh! no wonder it was showing thru and not beginning at the vehicle, if the beam is larger than that of 0.01, of course it's going to look like it starts beyond urhrhr - nice one Good

also, thanks for the wait tips, I didn't know that *makes mental note* ...aaaaand saved lol- and the remove references correction, like you mentioned, that was a complete brain fart Rolling Eyes

here's a lil some I cookd up for you right quick.. idk what your tastes are, or what you'd like to see, so I just threw some in a pot and mixed it up- I'll cook up another 1 this weekend sometime

[Help] cleo created lighting GMA


edit- k, played with both and guess I was wrong about the 0.01 *damn!* heh- the first settings are more suitable as they don't repeatedly bounce, but unfortunately, the lights still don't move with the vehicle and they're still crossing thru it instead of starting at the vehicle and shinning outward - basically, it's the same results as my initial script had - but I'll do a bunch more fiddling with the offsets and see what happens - thx much for your time big, it's appreciated for sure Wink

1st setting
[Help] cleo created lighting Ee5f1630244064 - [Help] cleo created lighting 3a006530244067

2nd set
[Help] cleo created lighting Bfa84430244068 - [Help] cleo created lighting 47cd1030244070

8[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Mar 20, 2009 10:48 pm

gtasbigfoot

gtasbigfoot
Admin

- OK, if that did not work, I've done some math working and written a script, so u can test em', I was actually testin' them, it seems the reason they can act strange is because there not actually made for cars/bikes/boats, the only vehicle which uses a searchlight in the game is the police helicopter. - Though this should work better now. Time is set to 11 PM at night, so you can see the maximum effect of them.


Code:

{$CLEO}
0000:


:SearchLight_01
while true
wait 250
if
  Player.Defined($PLAYER_CHAR)
then
    if
      Actor.Driving($PLAYER_ACTOR)
  then
        if
          0AB0:  key_pressed 107
         

        then
              break
            end
        end
    end
 end
00C0: set_current_time_hours_to 23 minutes_to 0
03C0: 0@ = actor $PLAYER_ACTOR car
0107: 1@ = create_object 0xB48 at 0.0 0.0 710.0
08D2: 1@  0.3 // --  scale
0382: set_object 1@ collision_detection 0
0750: set_object 1@ visibility 0
 
0441: 3@ = car 0@ model
07E4: get_model 3@ dimensions_cornerA_to 4@ 5@ 6@ dimensions_cornerB_to 7@ 8@ 9@
0087: 10@ = 9@ // (float)
000B: 10@ += 0.53
0681: attach_object 1@ to_car 0@ with_offset 0.0 -0.1 10@ rotation 0.0 180.0 0.0
000B: 9@ += 0.3

0407: store_coords_to 29@ 30@ 31@ from_car 0@ with_offset 0.0 21.0 9@
06C1: create_searchlight 14@ on_car 0@ with_offset 0.0 0.0 9@ radius 0.2 target 29@ 30@ 31@ radius 12.0
000F: 9@ -= 0.5
0407: store_coords_to 26@ 27@ 28@ from_car 0@ with_offset 2.0 20.7 9@
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset -2.0 20.7 9@
06B4: set_searchlight 14@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4

:SearchLight_02
while true
wait 25
if
    0256:  player $PLAYER_CHAR defined
then
    if
      82BF:  not car 0@ sunk
    then
        if or
          not car.Wrecked(0@)
          8AB0:  not key_pressed 109
          then
            break
            end
        end
    end
    jump @SearchLight_03
end
     
if or
Actor.Driving($PLAYER_ACTOR)
00DB:  actor $PLAYER_ACTOR in_car 0@
jf @SearchLight_03

0407: store_coords_to 26@ 27@ 28@ from_car 0@ with_offset 0.1 4.0 9@
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset -0.1 4.0 9@
06B4: set_searchlight 14@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
jump @SearchLight_02


:SearchLight_03
0108: destroy_object 1@
06B2: destroy_searchlight 14@
//--01C3: remove_references_to_car 0@ // Like turning a car into any random car

0A9F: 20@ = current_thread_pointer
20@ += 0x10
0A8D: 20@ = read_memory 20@ size 4 virtual_protect 0
20@ -= @Text
if 
0AA9:  is_game_version_original 
then
    0AA5: call 0x588BE0 num_params 4 pop 4 0 0 0 20@ 
else
    0AA5: call 0x5893B0 num_params 4 pop 4 0 0 0 20@
end
wait 1000
jump @SearchLight_01

:Text
hex
7E 67 7E 4C 69 67 68 74 73 5F 44 65 61 63 74 69
76 61 74 65 64 00
end



[Help] cleo created lighting Mpcl2r8b
[Help] cleo created lighting Zmq4y3sp
[Help] cleo created lighting Xue6daa9


Thank you - the banner is very nice, yea it's within my taste style, looks like some of that Matrix computer writing. - My kind of style.

http://gtamodding.com

9[Help] cleo created lighting Empty Re: [Help] cleo created lighting Sat Mar 21, 2009 2:54 am

Kotton



wow, I can actually understand most of it lol.. but definitely beyond my scope for sure- the math coding usually throws me off and I've never seen a script structured like that with breaks and such- it's bad ass- wish I was that good.. cuz that's sikk just lookn at it heh

thanks big, that's more or less what I was trying to achieve- it works great- guess I need to get my yacht in game and create an array of 'em - as well as the internal lighting - ay, wanna have a contest? I'll finish the yacht, then give it to you, zaz and aschratt - hmm, who else.. and we'll see who can light it up the best! ROFL - I'm just playn man

about the button, lol ye, I used a video clip of the Matrix for the BG-

[Help] cleo created lighting Ff326330289072 - [Help] cleo created lighting 96c8b230289073

10[Help] cleo created lighting Empty Re: [Help] cleo created lighting Sat Mar 21, 2009 4:16 am

gtasbigfoot

gtasbigfoot
Admin

I have lot of different styles of coding, (look in the "SA Memory Example" topic), I care much that when I write a script, I make it good looking, and easy for people to understand - I try to even if I write very long mission - I write comments to help, others. Though EXE editing rules... Though, I often get called "un-readable", when I do the HEX stuff and stuff like this:


Code:

0087: 93@ = 81@ // (float)
006B: 93@ *= 86@  // (float)
0087: 94@ = 95@ // (float)
006B: 94@ *= 83@ // (float)
0013: 94@ *= 0.5
0087: 96@ = 86@ // (float)
006B: 96@ *= 94@ // (float)
0087: 87@ = 93@ // (float)
005B: 87@ += 96@ // (float)
0087: 93@ = 82@ // (float)
006B: 93@ *= 86@  // (float)
0087: 94@ = 95@ // (float)
006B: 94@ *= 84@ // (float)
0013: 94@ *= 0.5
0087: 96@ = 86@  // (float)
006B: 96@ *= 94@ // (float)
0087: 88@ = 93@ // (float)
005B: 88@ += 96@ // (float)
0087: 89@ = 86@ // (float)
000B: 89@ += 0.008
0013: 89@ *= 0.5
0007: 90@ = -1.0
006B: 90@ *= 95@ // (float)
006B: 90@ *= 83@ // (float)
006B: 90@ *= 86@ // (float)
0007: 91@ = -1.0
006B: 91@ *= 95@ // (float)
006B: 91@ *= 84@ // (float)
006B: 91@ *= 86@  // (float)


- I don't know what your scope is... The script above - I posted only took me 3 mins to write, it's very easy.. I should think - your scripting level is not low, since you understand a lot of things...

--
There is some more modding info on this site - as-well, it's in Russian though, don't know if you understand that language or not.

Заглавная страница

- Seemann, started that Wiki...

http://gtamodding.com

11[Help] cleo created lighting Empty Re: [Help] cleo created lighting Sat Mar 21, 2009 4:47 am

Kotton



nah, I'm in California, and you know how most of us lazy americans are, we have a hard time learning our own language.. let alone another LOL

I can definitely appreciate how you structure your code, I'll learn a lot just from studying it.. for example, I didn't even realize displaying text could be so simple - besides my own research, ZAZ pretty much taught me all the basics and how to comprehend what I was reading- unfortunately, most coding sites are in a language other than english so I haven't gotten much further in my studies.. so this place you got going on + gtamodding is a bonus for sure-

more on the light- I've noticed that when I have the light activated and I'm moving fast in the vehicle, the light tends to lose it's positioning (especially on a bike) but that's not bothersome cuz the yacht will be slow- however, when I attempted to activate it on the reefer, it deactivates immediately afterwards - and I can plainly see that the code is not vehicle specific.. so is this maybe a result of the constant movement of the "ocean" and re-calculations? (just a wild guess lol)

12[Help] cleo created lighting Empty Re: [Help] cleo created lighting Sat Mar 21, 2009 10:38 am

gtasbigfoot

gtasbigfoot
Admin

Nice place, lots of things to do there...

Yes, ZAZ is a very good scripter, don't know if he's skilled in memory handling, or C++, but he has got great GTA scripting skills - also has a good taste with his avatars IMO.

Hu-huh, I know Braggin , most modding sites are in Russian or German, and some times Japanese. I understand them languages anyway - so it does not really matter to me.

--
I think it maybe just the game effects, when going fast in a vehicle, the games engine activates the motion blur - I'm sure when the car comes to stop again it will be the same as it was.

Umm, I guess the opcode 82BF: not car 0@ sunk will not go well with a boat - maybe that opcode is the reason for such a problem. - I deleted that opcode and got into a Reefer boat, and it worked by me:

Code:

{$CLEO}
0000:


:SearchLight_01
while true
wait 250
if
  Player.Defined($PLAYER_CHAR)
then
    if
      Actor.Driving($PLAYER_ACTOR)
  then
        if
          00E1:  player 0 pressed_key 10 // -- "~Conversation No~" (N) key
      then
              break
            end
        end
    end
 end

gosub @ReadAddress
20@ -= 0xFFFFFD2C  // -- offset -724 (-0x2D4) 0xFFFFFD2C = @text0
gosub @CreateTextBox
00C0: set_current_time_hours_to 23 minutes_to 0
03C0: 0@ = actor $PLAYER_ACTOR car
0107: 1@ = create_object 0xB48 at 0.0 0.0 710.0
08D2: 1@  0.3 // --  scale
0382: set_object 1@ collision_detection 0
0750: set_object 1@ visibility 0
 
0441: 3@ = car 0@ model
07E4: get_model 3@ dimensions_cornerA_to 4@ 5@ 6@ dimensions_cornerB_to 7@ 8@ 9@
0087: 10@ = 9@ // (float)
000B: 10@ += 0.53
0681: attach_object 1@ to_car 0@ with_offset 0.0 -0.1 10@ rotation 0.0 180.0 0.0
000B: 9@ += 0.3

0407: store_coords_to 29@ 30@ 31@ from_car 0@ with_offset 0.0 21.0 9@
06C1: create_searchlight 14@ on_car 0@ with_offset 0.0 0.0 9@ radius 0.2 target 29@ 30@ 31@ radius 12.0
000F: 9@ -= 0.5
0407: store_coords_to 26@ 27@ 28@ from_car 0@ with_offset 2.0 20.7 9@
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset -2.0 20.7 9@
06B4: set_searchlight 14@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4

:SearchLight_02
while true
wait 25
if
    0256:  player $PLAYER_CHAR defined
then
   
    if or
          not car.Wrecked(0@)
          8AB0:  not key_pressed 109
          then
            break
        end
    end
    jump @SearchLight_03
end
   
if or
Actor.Driving($PLAYER_ACTOR)
00DB:  actor $PLAYER_ACTOR in_car 0@
jf @SearchLight_03

0407: store_coords_to 26@ 27@ 28@ from_car 0@ with_offset 0.1 4.0 9@
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset -0.1 4.0 9@
06B4: set_searchlight 14@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
jump @SearchLight_02


:SearchLight_03
0108: destroy_object 1@
06B2: destroy_searchlight 14@
//--01C3: remove_references_to_car 0@ // Like turning a car into any random car
gosub @ReadAddress
20@ -= 0xFFFFFD11  // -- offset -751 (-0x2EF ) 0xFFFFFD11 = @text
gosub @CreateTextBox
jump @SearchLight_04

:ReadAddress
0A9F: 20@ = current_thread_pointer
20@ += 0x10
0A8D: 20@ = read_memory 20@ size 4 virtual_protect 0
return // -- as all gosubs return

:CreateTextBox
if
0AA9:  is_game_version_original
then
    0AA5: call 0x588BE0 num_params 4 pop 4 0 0 0 20@
else
    0AA5: call 0x5893B0 num_params 4 pop 4 0 0 0 20@
end
return // -- as all gosubs return

:SearchLight_04
wait 1000
jump @SearchLight_01

                 
:Text0
hex
7e 67 7e 53 75 63 63 65 73 73 66 75 6c 6c 79
5f 69 6e 73 74 61 6c 6c 65 64 21 00
end

:Text
hex
7E 67 7E 4C 69 67 68 74 73 5F 44 65 61 63 74 69
76 61 74 65 64 00
end


The light should work on boats now as-well.

http://gtamodding.com

13[Help] cleo created lighting Empty Re: [Help] cleo created lighting Sat Mar 21, 2009 4:31 pm

Kotton



oh snap lol- if it was a snake, it would have killed me.. I should have spotted that straight away - freakn 82BF: ffs dur-dur -works flawlessly, thank you sir - "install successful!" LOL, beautiful use of gosubs.. show off! xD j/k j/k

ye, forgot to mention that when the vehicle slows or stops, it rights itself.. however, I've changed the offsets to favor X instead of Y and it hardly moves when compared to using the Y positioning Christmas

so you know 4 languages then??? (5 including C++ lol) for christ sakes man! translators get paid CRAZY dough.. well, here they do anyway, don't know much about elsewhere - wtf? you CIA or some shyt? xD

yeah zaz is the man, if someone's intent on teaching others the "how to" as you and he do, they get my immediate respect and admiration - nothing irks me more than people that sit on knowledge like it's a golden egg.. and don't even get me started on individuals that like to flash minuscule amounts of what they possess, teasing others like they're dangling a fresh cut steak in front of a caged dog ffs Sly

so check it.. as I've mentioned, I've changed a few things (hope you don't mind) - but I noticed that most of the allowed 31 variables are occupied - are the store coordinates and light path used in the second label a necessity? if I exclude them, will it still draw from the target path set in label 1? - the reason I ask is I need another set for the other side, so I would need another 6 variables to set the additional path - I would normally try it, but I'm at work atm and won't be home for a few hours..

here's a couple of images of what I did before I left for work..
(nvm the yacht, I was testing the mesh last week as a map object)

[Help] cleo created lighting E2cbe730335513 - [Help] cleo created lighting 711af830335516

I need to tweak 9@ after I get the yacht in game, and I figured I could set the target X offset further away so the lights wouldn't bunch together (since we don't have the resources to set offsets for each light obviously) but so far, so sikk! Christmas again, thx for your time and energy on this dog -I appreciate it big

here's another tag.. more theme oriented [Help] cleo created lighting GMA2

14[Help] cleo created lighting Empty Re: [Help] cleo created lighting Sun Mar 22, 2009 12:32 am

gtasbigfoot

gtasbigfoot
Admin

Yes, I have to know these languages, I know English well since I was 10, and as for Russian & German, well that is because I am Russian - as for Japanese I learned to speak it when I was over in Tokyo for a long time.

--

Well, I think if some one knows more than an other at something, then he/she should share that, - and I and ZAZ like to help -

--

Yes, there needed, if you are worried because max variables in threads is 31@ I guess you could set the flag to $ONMISSION = 1, before you create the searchlights, if player is out of the vehicle or car is wrecked, then set the flag back to normal $ONMISSION = 0, this will allow you to think game is on a mission to use variables in ranges:(0@..1023@) turn off the Ranges check in SB.

-- as for the motion blur if the game if you do not like it, you can clear it with this:


Code:

0A8C: write_memory 0x8D5104 size 0x0 value 0x1 virtual_protect 0


Or like that:


Code:

0006: 0@ = 0x8D5104
0006: 2@ = 0
0006: 3@ = 1
gosub @MemoryWrite



Code:

:MemoryWrite
0085: 5@ = 0@
0@ /= 4
0@ *= 4          // memory address
0062: 5@ -= 0@    // offset (0, 1, 2, 3)
:_GetInitValue      // if you specify mem offset in 5@, you're able to gosub here
gosub @MemoryRead // get initial value
3@ *= 8 // bytes -> bits
5@ *= 8
dec(3@)
for 6@ = 0 to 3@
  if
    08B6: test 2@ bit 6@
  then
    08BF: set 1@ bit 5@    // 1
  else
    08C5: clear 1@ bit 5@  // 0
  end
  inc(5@) // next memory bit
end 
008A: &0(0@,1i) = 1@  // write new value
return


//--write 32-bit value into memory-----------

:MemoryWrite32bit
0@ -= 0xA49960
0@ /= 4
008A: &0(0@,1i) = 1@
return

//--read 32-bit value from memory-----------

:MemoryRead
0@ -= 0xA49960
0@ /= 4
008B: 1@ = &0(0@,1i)
return



--

Thanks for that banner as-well, I'll use both of them, when I get some free time, to put them on "LinkUs" page, and of course I'll give credits to you for making them. Good



Last edited by gtasbigfoot on Thu Oct 22, 2009 4:35 pm; edited 2 times in total

http://gtamodding.com

15[Help] cleo created lighting Empty Re: [Help] cleo created lighting Sun Mar 22, 2009 4:22 am

Kotton



bah.. credit schmedit, it's just a button.. I don't need my name associated with it, you know where you got it, that's all that matter Good

wow- 1024 total!? SWEEEET! thanks big, I didn't EVEN know that 1 - that's flippn awesome - good look on the motion blur as well.. I'll implement that straight away Christmas woo hoo! 1024!? holy nutty crap batman! lol

16[Help] cleo created lighting Empty Re: [Help] cleo created lighting Tue Mar 24, 2009 7:19 am

Kotton



ay big what's crackn-

I've created another label and added the onmission parameters (0004:) but I'm still getting the compile error that reads I'm using too many variables - do I need to define the onmission parameters as well (0180:)?

17[Help] cleo created lighting Empty Re: [Help] cleo created lighting Tue Mar 24, 2009 7:46 am

gtasbigfoot

gtasbigfoot
Admin

No. That code is not needed - as this already exist in main.scm, and only should be defined once.

Umm, turn off the "Ranges check" in Sanny Builder "Options", I forgot to say that $onmission is needed if you want the game to think that it's ON a mission. But to use higher variables turn off that option in Sanny Builder, sorry I said it wrong in the other post I think. What I meant was this. Seemann implied this feature.

http://gtamodding.com

18[Help] cleo created lighting Empty Re: [Help] cleo created lighting Tue Mar 24, 2009 2:29 pm

Kotton



oh ok.. so I don't even need to use the onmission flags then? sweeeeet - thx a mill big! Christmas

edit- oh yeah, forgot to ask.. I know there's a limit on creating items (like when using 0248: for example) so do I need to separate the creation of these spotlights when creating.. oh lets say.. 20 of them? -if so, what do I use to separate them? I use jf + if and //on the 0248's

19[Help] cleo created lighting Empty Re: [Help] cleo created lighting Wed Mar 25, 2009 2:36 am

gtasbigfoot

gtasbigfoot
Admin

You should able to create 20 searchlights normally, the game should not have any problems with that. Just remember never to use 32@, or 33@ as a handler(for the opcode 06C1), as there timers, and should never be used as a handler varible.

- jf(jump_if_false) should only be used on a conditional opcode, or a gosub, when using the return_true, return_false trick only.

---
About the 0248 question,
I think I understood you right, if we are speaking of the opcode 0248(checking if the models you loaded, are really available),
then 9 is the max, but 7 is recommended as the highest(in one loop), if we needed to load say 11 different models then we would do it like this:


Code:


while true
if and
0248:  model <model 1> available
0248:  model <model 2> available
0248:  model <model 3> available
0248:  model <model 4> available
0248:  model <model 5> available
0248:  model <model 6> available
0248:  model <model 7> available
then
    break
  end
    wait 0
end // while

while true
if and
0248:  model <model 8> available
0248:  model <model 9> available
0248:  model <model 10> available
0248:  model <model 11> available
then
    break
  end
    wait 0
end // while


Did I understand your question correct?

http://gtamodding.com

20[Help] cleo created lighting Empty Re: [Help] cleo created lighting Thu Mar 26, 2009 12:29 am

Kotton



yes, you understood perfectly.. ZAZ taught me about the max use of 7 to avoid problems when using OC 0248, but I didn't know about the proper use of it's handling (no jf's)- I'll definitely use your format in the future - I also didn't know about the 32@ and 33@, so thanks for that! Good

edit- k, here's the script- it crashes and I can't seem to get it working beyond that of 10 - the onmission flags are there because I tested it that way as well just to make sure..

Code:
{$CLEO}
0000:


:SearchLight_01
while true
wait 250
if
  Player.Defined($PLAYER_CHAR)
then
    if
      Actor.Driving($PLAYER_ACTOR)
  then
        if
          00E1:  player 0 pressed_key 10 // -- "~Conversation No~" (N) key
      then
              break
            end
        end
    end
 end
0004: $ONMISSION = 1
03C0: 0@ = actor $PLAYER_ACTOR car
0107: 1@ = create_object 0xB48 at 0.0 0.0 710.0
08D2: 1@  0.3 // --  scale
0382: set_object 1@ collision_detection 0
0750: set_object 1@ visibility 0
 
0441: 3@ = car 0@ model
07E4: get_model 3@ dimensions_cornerA_to 4@ 5@ 6@ dimensions_cornerB_to 7@ 8@ 9@
0087: 10@ = 9@ // (float)
000B: 10@ += 0.53
0681: attach_object 1@ to_car 0@ with_offset 0.0 -0.1 10@ rotation 0.0 180.0 0.0
000B: 9@ += -1.0

0407: store_coords_to 29@ 30@ 31@ from_car 0@ with_offset 21.0 2.0 9@
0407: store_coords_to 34@ 35@ 36@ from_car 0@ with_offset -21.0 -2.0 9@
06C1: create_searchlight 14@ on_car 0@ with_offset 0.0 0.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 11@ on_car 0@ with_offset 0.0 2.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 12@ on_car 0@ with_offset 0.0 -2.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 13@ on_car 0@ with_offset 0.0 4.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 15@ on_car 0@ with_offset 0.0 -4.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 16@ on_car 0@ with_offset 0.0 6.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 17@ on_car 0@ with_offset 0.0 -6.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 18@ on_car 0@ with_offset 0.0 8.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 19@ on_car 0@ with_offset 0.0 -8.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 20@ on_car 0@ with_offset 0.0 10.0 9@ radius 0.08 target 29@ 30@ 31@ radius 11.0
06C1: create_searchlight 37@ on_car 0@ with_offset 0.0 0.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 38@ on_car 0@ with_offset 0.0 2.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 39@ on_car 0@ with_offset 0.0 -2.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 40@ on_car 0@ with_offset 0.0 4.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 41@ on_car 0@ with_offset 0.0 -4.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 42@ on_car 0@ with_offset 0.0 6.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 43@ on_car 0@ with_offset 0.0 -6.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 44@ on_car 0@ with_offset 0.0 8.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 45@ on_car 0@ with_offset 0.0 -8.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
06C1: create_searchlight 46@ on_car 0@ with_offset 0.0 10.0 9@ radius 0.08 target 34@ 35@ 36@ radius 11.0
000F: 9@ -= 6.0
0407: store_coords_to 26@ 27@ 28@ from_car 0@ with_offset 21.7 2.0 9@
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset 21.7 -2.0 9@
06B4: set_searchlight 14@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 11@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 12@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 13@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 15@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 16@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 17@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 18@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 19@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 20@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 37@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 38@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 39@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 40@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 41@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 42@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 43@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 44@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 45@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4
06B4: set_searchlight 46@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 2.4

:SearchLight_02
while true
wait 25
if
    0256:  player $PLAYER_CHAR defined
then
 
    if or
          not car.Wrecked(0@)
          8AB0:  not key_pressed 109
          then
            break
        end
    end
    jump @SearchLight_03
end
 
if or
Actor.Driving($PLAYER_ACTOR)
00DB:  actor $PLAYER_ACTOR in_car 0@
jf @SearchLight_03

0407: store_coords_to 26@ 27@ 28@ from_car 0@ with_offset 21.1 0.0 9@
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset 21.1 -0.0 9@
0407: store_coords_to 47@ 48@ 49@ from_car 0@ with_offset -21.1 0.0 9@
0407: store_coords_to 50@ 51@ 52@ from_car 0@ with_offset -21.1 -0.0 9@
06B4: set_searchlight 14@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 11@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 12@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 13@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 15@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 16@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 17@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 18@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 19@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 20@ path_between 26@ 27@ 28@ and 23@ 24@ 25@ set_speed 15.0
06B4: set_searchlight 37@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 38@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 39@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 40@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 41@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 42@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 43@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 44@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 45@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
06B4: set_searchlight 46@ path_between 47@ 48@ 49@ and 50@ 51@ 52@ set_speed 15.0
jump @SearchLight_02


:SearchLight_03
0004: $ONMISSION = 0
0108: destroy_object 1@
06B2: destroy_searchlight 14@
06B2: destroy_searchlight 11@
06B2: destroy_searchlight 12@
06B2: destroy_searchlight 13@
06B2: destroy_searchlight 15@
06B2: destroy_searchlight 16@
06B2: destroy_searchlight 17@
06B2: destroy_searchlight 18@
06B2: destroy_searchlight 19@
06B2: destroy_searchlight 20@
06B2: destroy_searchlight 37@
06B2: destroy_searchlight 38@
06B2: destroy_searchlight 39@
06B2: destroy_searchlight 40@
06B2: destroy_searchlight 41@
06B2: destroy_searchlight 42@
06B2: destroy_searchlight 43@
06B2: destroy_searchlight 44@
06B2: destroy_searchlight 45@
06B2: destroy_searchlight 46@
01C3: remove_references_to_car 0@ // Like turning a car into any random car
jump @SearchLight_01



Last edited by Kotton on Thu Mar 26, 2009 5:58 am; edited 5 times in total

21[Help] cleo created lighting Empty Re: [Help] cleo created lighting Thu Apr 02, 2009 1:30 am

gtasbigfoot

gtasbigfoot
Admin

Hello, sorry for no update - I've been fixing my computer, something went wrong with it's graphical system - so I have not been able to update/check if any one has posted a question. Still busy fixing it's problem it has with the iTunes, Google Earth, and why it's not running San Andreas, or any other game I wish to play.

--

- it's very hard to test your script at the moment. You could try one at a time - Attach one first, and try a second, and so on from there, I have tested about 11 in some script I did for the Rhino tank a year or so ago.

I'll try and have a look at the script, and the "created" searchlights limit as soon as I fix my computers problems. BTW, there does exist a useful program called IDA View which is quite useful when it comes to looking at the EXE, it's not free but problay one of best program for disassemble and debugging.

P.S. I joined your site; user name is "Seeruhe". Grin Smile



Last edited by gtasbigfoot on Thu May 07, 2009 4:43 am; edited 1 time in total

http://gtamodding.com

22[Help] cleo created lighting Empty Re: [Help] cleo created lighting Fri Apr 03, 2009 4:27 pm

Kotton



no worries big, I'm not one to rush out my mods
..just glad to hear the CIA didn't scoop you up xD

thx for the advice and much luck with your pc-

23[Help] cleo created lighting Empty Re: [Help] cleo created lighting Thu Oct 14, 2010 1:03 am

findmy012



thanks for sharing

___________

anal sex
girls next door

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum