Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,964 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

ZAZ

[SA] ~ CLEO Script Tutorial ~

Recommended Posts

ZAZ

 

Ok Zaz I need you expertise again.

 

I tried doing this:

 

:GANG_TASK_UNIT_585 if or Player.WantedLevel($PLAYER_CHAR) = 1 Player.WantedLevel($PLAYER_CHAR) = 2 Player.WantedLevel($PLAYER_CHAR) = 3 Player.WantedLevel($PLAYER_CHAR) = 4 Player.WantedLevel($PLAYER_CHAR) = 5 else_jump @GANG_TASK_UNIT_585  06E4: AS_actor [email protected] attempt_to_bust_actor $PLAYER_ACTOR  06E4: AS_actor [email protected] attempt_to_bust_actor $PLAYER_ACTOR 

 

 

Game crashes

Player.WantedLevel($PLAYER_CHAR) = 1 is no condition opcode, it means set player wanted level

 

------------------------------------------------------------------

 

The origin random_car (get_car_in_sphere handle_as [email protected]) have unstable aspects

just read the coords when [email protected] is not -1 and then destroy it

and don't bind this check into the load model check

decrease the radius of 073E: instead checking if it is near player in radius of 100.0

 

don't spawn actors or vehicles in the same position

 

[email protected] = Actor.Create(Cop, #SPECIAL01, [email protected], [email protected], [email protected])[email protected] = Actor.Create(Cop, #SPECIAL02, [email protected], [email protected], [email protected])[email protected] = Actor.Create(gang1, #BALLAS3, [email protected], [email protected], [email protected])

 

 

check if the tuningpart is loaded

 

06EA:   car_component_available #WHEEL_GN3

 

 

 

{$CLEO .cs}thread 'GANG_TASK_UNIT' :GANG_TASK_UNIT_19wait 0 if   Player.Defined($PLAYER_CHAR)jf @GANG_TASK_UNIT_19 if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 1555.0 -1520.0 100.0 radius 1275.0 800.0 1000.0 jf @GANG_TASK_UNIT_1900A0: store actor $PLAYER_ACTOR position to [email protected] [email protected] [email protected] 073E: get_car_in_sphere [email protected] [email protected] [email protected] radius 100.0 model -1 handle_as [email protected] if   not [email protected] == -1 jf @GANG_TASK_UNIT_19 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0 [email protected] = Car.Angle([email protected]):GANG_TASK_UNIT_169wait 0 023C: load_special_actor 'TENPEN' as 1 // models 290-299 023C: load_special_actor 'PULASKI' as 2 // models 290-299 Model.Load(#COPCARLA)Model.Load(#DESERT_EAGLE)Model.Load(#SHOTGSPA)Model.Load(#BALLAS3)06E9: load_car_component #WHEEL_GN3 038B: load_requested_models if and023D:   special_actor 1 loaded 023D:   special_actor 2 loaded   Model.Available(#COPCARLA)  Model.Available(#DESERT_EAGLE)  Model.Available(#SHOTGSPA)  Model.Available(#BALLAS3)06EA:   car_component #WHEEL_GN3 available jf @GANG_TASK_UNIT_169 Car.Destroy([email protected])[email protected] = Car.Create(#COPCARLA, [email protected], [email protected], [email protected])06E7: [email protected] = add_car_component #WHEEL_GN3 to_car [email protected] 0229: set_car [email protected] primary_color_to 0 secondary_color_to 1 Car.SetMaxSpeed([email protected], 20.0)Car.Angle([email protected]) = [email protected]([email protected]) = 1000Car.SetToNormalDriver([email protected])Car.SetDriverBehaviour([email protected], KillThePlayer)[email protected] = Actor.Create(Cop, #SPECIAL01, 0.0, 0.0, 100.0)[email protected] = Actor.Create(Cop, #SPECIAL02, 1.0, 0.0, 100.0)[email protected] = Actor.Create(Gang1, #BALLAS3, 2.0, 0.0, 100.0)01B2: give_actor [email protected] weapon 27 ammo 9999 // Load the weapon model before using this Actor.WeaponAccuracy([email protected]) = 95081A: set_actor [email protected] weapon_skill_to 1 Actor.WeaponAccuracy([email protected]) = 95087E: set_actor [email protected] weapon_droppable 1 087E: set_actor [email protected] weapon_droppable 1 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 07DD: set_actor [email protected] temper_to 100 // see pedstats.dat 0245: set_actor [email protected] walk_style_to "SWAT" 0245: set_actor [email protected] walk_style_to "SWAT" 0245: set_actor [email protected] walk_style_to "GANG1" 072A: put_actor [email protected] into_car [email protected] driverseat 0430: put_actor [email protected] into_car [email protected] passenger_seat 0 0430: put_actor [email protected] into_car [email protected] passenger_seat 1 03FE: set_actor [email protected] money 2491 0296: unload_special_actor  10296: unload_special_actor  2Model.Destroy(#BALLAS3)Model.Destroy(#COPCARLA)Model.Destroy(#DESERT_EAGLE)Model.Destroy(#SHOTGSPA)Model.Destroy(#WHEEL_GN3):GANG_TASK_UNIT_565wait 0 if   Player.Defined($PLAYER_CHAR)jf @GANG_TASK_UNIT_659 if or  Car.Wrecked([email protected])01F4:   car [email protected] flipped 8202:   not actor $PLAYER_ACTOR near_car [email protected] radius 500.0 500.0 flag 0 jf @GANG_TASK_UNIT_633 jump @GANG_TASK_UNIT_659 :GANG_TASK_UNIT_633if and  Actor.Dead([email protected])  Actor.Dead([email protected])  Actor.Dead([email protected])jf @GANG_TASK_UNIT_565 :GANG_TASK_UNIT_659Car.RemoveReferences([email protected])Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])jump @GANG_TASK_UNIT_19

 

 

give the car a marker for better observation

 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
bmb

Thanks Zaz, for all your help. That script is much better and I even got opcode 06E4 to work now.

 

 

Car.SetDriverBehaviour([email protected], KillThePlayer)

 

 

That was funny, can psychodriver or other words be used there too?

 

Going to re-read your tutorials for now, and try to pick up more ideas.

 

Great work as always. icon14.gif

Share this post


Link to post
Share on other sites
ZAZ

 

Thanks Zaz, for all your help. That script is much better and I even got opcode 06E4 to work now.

 

 

Car.SetDriverBehaviour([email protected], KillThePlayer)

 

 

That was funny, can psychodriver or other words be used there too?

 

Going to re-read your tutorials for now, and try to pick up more ideas.

 

Great work as always.  icon14.gif

these keywords are working for Car.SetDriverBehaviour:

Nowhere, FollowRoad, KillThePlayer, DriveToPlayer, IgnoreRoadPaths

Share this post


Link to post
Share on other sites
Matheus Reis

Hi ZAZ, I want to create a thing but I don't know how, can you help me?

 

Is this: I want to create a scm path but give to the coords a range, because when I put two cars to drive along the same path, a car hit the other and vice-versa, how can I fix it?

Share this post


Link to post
Share on other sites
ZAZ

 

Hi ZAZ, I want to create a thing but I don't know how, can you help me?

 

Is this: I want to create a scm path but give to the coords a range, because when I put two cars to drive along the same path, a car hit the other and vice-versa, how can I fix it?

"but give to the coords a range"? don't know what you with this

 

You could assign the carrec path with a delay to the next car.

But best would be to make own carrec paths for each car. Do much effort to get good paths.

The more you make experience the more you will get good results

Share this post


Link to post
Share on other sites
Matheus Reis

I'm meaning that the cars don't have to pass exactly where I assigned in scm path, understand?

 

How can I make carrec paths? '-' With APE?

 

Can you give me an example script?

 

They respect the traffic light, how do I change it?

Edited by Matheus Reis

Share this post


Link to post
Share on other sites
ZAZ

They should ignore the paths, yes, read the car drive tutorial

Go to the first post of this tut and look for the themes, there you find the link to the Car Drive Tutorial and to Use Carrec Paths

Share this post


Link to post
Share on other sites
Matheus Reis
I'm meaning that the cars don't have to pass exactly where I assigned in scm path, understand?

Is it impossible? '-'

Share this post


Link to post
Share on other sites
ZAZ

 

I'm meaning that the cars don't have to pass exactly where I assigned in scm path, understand?

Is it impossible? '-'

 

add_point_to_scmpath gives the cardriver a destination of an point and not of an area

 

05D6: clear_scmpath05D7: add_point_to_scmpath  2353.1528 -1658.6493 13.38405D7: add_point_to_scmpath  2431.7739 -1674.7444 13.664307E7: AS_assign_scmpath_to_actor [email protected] in_car [email protected] speed  20.0 flags  0  0  5

 

 

fourth param in 07E7: belongs to paths of nodes.dat

0 0 5 let it drive on paths

2 0 5 ignore the paths

 

 

 

If you wanna check if the car is near that point within a radius of maybe 20.0 units, then add a check

 

01AF:   car [email protected]  0 ()near_point [email protected] [email protected] [email protected] radius  20.0  20.0  50.0

 

and give him new destionations

 

05D6: clear_scmpath05D7: add_point_to_scmpath  < x, y, z, new destination>07E7: AS_assign_scmpath_to_actor [email protected] in_car [email protected] speed  20.0 flags  0  0  5

 

Share this post


Link to post
Share on other sites
Matheus Reis

I've created a carrec path but the car ignore the obstacles, for example:

 

I've entered in the front of the car that I assigned the path, it ignore me and hit CJ, how can I change it?

 

And I want to move camera with mouse, I've made it but now I don't know what i've did, help me! (I saw it in carrec path camera)

Edited by Matheus Reis

Share this post


Link to post
Share on other sites
ZAZ

 

I've created a carrec path but the car ignore the obstacles, for example:

 

I've entered in the front of the car that I assigned the path, it ignore me and hit CJ, how can I change it?

 

And I want to move camera with mouse, I've made it but now I don't know what i've did, help me! (I saw it in carrec path camera)

The vehicle moves like train on a carrec-track.

Assigne the vehicle to carrec path when player has entered the car.

Camera works normal.

Did you tried my script example? click

 

If you had a camera problem, did it worked then again correct when you played then normally?

Share this post


Link to post
Share on other sites
Matheus Reis

So, how can I create a race like Rockstar ?! (With carrecs it occur, and with scm path or drive sequence is possible only to create 4 or 5 route-points), help me, you shouldn't know how much I want to know how to do that. dontgetit.gif

Share this post


Link to post
Share on other sites
ZAZ

 

So, how can I create a race like Rockstar ?! (With carrecs it occur, and with scm path or drive sequence is possible only to create 4 or 5 route-points), help me, you shouldn't know how much I want to know how to do that. dontgetit.gif

Not possible to explain. It's a theme for advanced coders. I'm the only one who made such scripts. (or maybe Desinka for Alien city)

[CLEO|WIP] New Races and NFS Outrun, Play the GTA SA races with every car you want

I adapted Rockstars CPRACE script and translated for cleo all globals into locals and edited a lot more.

It's a multiple script which use arrays and reads for each race a table of coords. It doesn' matter if it have 3 checkpoints or 30

For map mods I used the part which was done for the heli races to change the code to let opponent cars drive on carrec paths.

 

Well, it would be possible do make a more simple script.

You should read the car drive tutorial carfully, test the example scripts and try to understand just to get praxis with car driving scripts.

To use carrec paths, assigne the path to the car immediately after it is created.

Share this post


Link to post
Share on other sites
kal-el5676

I'm not a noob just not a coder so someone please answer my SIMPLE question!!!!!!! Ped spawn, how? i can spawn one but it just stands there. I wanna spawn a ped at my coords, set it to aggressive or no, and have it walk around, then repeat. suicidal.gifsuicidal.gifsuicidal.gifsuicidal.gifsuicidal.gifsuicidal.gifsuicidal.gifsuicidal.gifsuicidal.gifsuicidal.gifsuicidal.gif

Share this post


Link to post
Share on other sites
ZAZ

 

I'm not a noob just not a coder so someone please answer my SIMPLE question!!!!!!! Ped spawn, how? i can spawn one but it just stands there. I wanna spawn a ped at my coords, set it to aggressive or no, and have it walk around, then repeat.  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif  suicidal.gif

 

 

script below: go into red sphere in Grovestreet to spawn swat actor

 

{$CLEO .cs}:ActorWalk_103A4: name_thread 'MODL':ActorWalk_20001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @ActorWalk_200D6: if  000FF:   actor $PLAYER_ACTOR  1 (in-sphere)near_point_on_foot 2491.5  -1667.5  13.35 radius  1.0  1.0  1.0004D: jump_if_false @ActorWalk_20247: request_model #SWAT:Load_Model_Check0001: wait  0 ms00D6: if  00248:   model #SWAT available004D: jump_if_false @Load_Model_Check009A: [email protected] = create_actor_pedtype 22 model #SWAT at 2487.5  -1660.5  13.350173: set_actor [email protected] z_angle_to 255.37810249: release_model #SWAT0615: define_action_sequences [email protected]: clear_scmpath05D7: add_point_to_scmpath  2474.4036 -1671.1002 13.331405D7: add_point_to_scmpath  2482.3828 -1682.174 13.330405D7: add_point_to_scmpath  2480.8169 -1726.5841 13.554705D7: add_point_to_scmpath  2522.562 -1725.4154 13.5469  05D7: add_point_to_scmpath  2522.7358 -1718.514 13.531205D7: add_point_to_scmpath  2535.6318 -1706.942 13.437205D7: add_point_to_scmpath  2528.6187 -1690.41 13.701505D7: add_point_to_scmpath  2509.6377 -1676.5874 13.546905D8: AS_assign_scmpath to_actor -1 flags  7  3  0616: define_action_sequences_end [email protected]: assign_actor [email protected] to_action_sequences [email protected]: remove_references_to_AS_pack [email protected] :ActorWalk_30001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @ActorWalk_3if  or  Actor.Dead([email protected])80FF:   NOT   actor $PLAYER_ACTOR  0 ()near_point_on_foot 2491.5  -1667.5  13.35 radius  100.0  100.0  2.0004D: jump_if_false @ActorWalk_301C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ActorWalk_2

 

Share this post


Link to post
Share on other sites
kal-el5676

Thanks for responding zaz, however maybe i wasn't clear enough.

 

This code i need will be for a cleaned map so there won't be a grove street. I want to place a ped either have it walk around randomly or use the "go to" opcode so it walks, then either set it aggressive or not. I don't want any type of prompt. no button press, no sphere.

 

I was getting close with this basic code:

 

 

{$CLEO .cs}//-------------MAIN---------------thread 'SURVIVOR'0A95: enable_thread_saving:Threadwait 0Model.Load(#FBI)ifModel.Available(#FBI)jf @Thread009A: [email protected] = create_actor_pedtype 4 model #FBI at X Y Z05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0A93: end_custom_thread 

 

 

I left out the go to opcode. it works when i spawn near the ped, but if i approach the ped from a distance it's all bright like in dyom and standing crooked. can you see what i'm going for? just spawn ped, aggressive or no, and walk to a place. i'd like it to walk but if it see's the player it attacks. no weapons, no prompts just this code to spawn a ped. also i'd like to be able to repeat it for many many peds. think of it as me trying to get peds into my custom map. And again, thanks a million zaz.

Share this post


Link to post
Share on other sites
ZAZ

 

Thanks for responding zaz, however maybe i wasn't clear enough.

I think so too and posting a script attempt is better than smilies

 

This code i need will be for a cleaned map so there won't be a grove street. I want to place a ped either have it walk around randomly or use the "go to" opcode so it walks, then either set it aggressive or not. I don't want any type of prompt. no button press, no sphere.

It's the wrong approach to do it without check (prompt)

A valid game action is only playing in that area where the player and the cam is available

For a solid coding you have to check if the player is the action area.

Create your stuff only when you need and dismiss it when it's not needed, if player is far away, if the action ends,

if player is wasted or busted, remove the reference of the item handles.

 

Build the script structure in 2 Loops

first loop before the event

second loop after the event

 

start the script in a default state loop which checks any condition to start the action

find the proper condition for your plan

opcode 00FF: is very usefull, it allows to increase the radius for the check

it can also display a red sphere by changing sphere-parameter

00FF: actor $PLAYER_ACTOR 1<---change it to 0 to disable the red sphere

 

-Script head

-1.Loop-Adress

-wait code

-IF player_defined-check

-Conditional Check

-Event

-2.Loop-Adress

-wait code

-IF player_defined-check

-Conditional Check

-Normal jump instruction to 1.LoopAdress

 

 

My posted script works also on a cleaned map it just needs to change the coords

the "walk to" opcode instead the scm-path definition is also possible

 

05D3: AS_actor [email protected] goto_point -1268.4003 -384.2416 17.1894 mode 4 999999 ms // versionA

 

have tested on a TC

have also tested the scm-path definition on TC

just 4 points at this time

 

0615: define_action_sequences [email protected]: clear_scmpath05D7: add_point_to_scmpath  -1289.3685 -386.396 17.189405D7: add_point_to_scmpath  -1295.3685 -386.396 17.189405D7: add_point_to_scmpath  -1295.3685 -380.396 17.189405D7: add_point_to_scmpath  -1310.3685 -380.396 17.1894  05D8: AS_assign_scmpath to_actor -1 flags  4  3  0616: define_action_sequences_end [email protected]: assign_actor [email protected] to_action_sequences [email protected]: remove_references_to_AS_pack [email protected]

 

 

 

I was getting close with this basic code:

 

 

{$CLEO .cs}//-------------MAIN---------------thread 'SURVIVOR'0A95: enable_thread_saving:Threadwait 0Model.Load(#FBI)ifModel.Available(#FBI)jf @Thread009A: [email protected] = create_actor_pedtype 4 model #FBI at X Y Z05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0A93: end_custom_thread 

 

I left out the go to opcode. it works when i spawn near the ped, but if i approach the ped from a distance it's all bright like in dyom and standing crooked. can you see what i'm going for? just spawn ped, aggressive or no, and walk to a place. i'd like it to walk but if it see's the player it attacks. no weapons, no prompts just this code to spawn a ped. also i'd like to be able to repeat it for many many peds. think of it as me trying to get peds into my custom map. And again, thanks a million zaz.

 

 

As I said above:

For a solid coding you have to check if the player is the action area.

Create your stuff only when you need and dismiss it when it's not needed, if player is far away, if the action ends,

if player is wasted or busted, remove the reference of the item handles.

Build the script structure in 2 Loops

first loop before the event

second loop after the event

 

Then the script can repeating

 

 

As next you have to find the proper method for your plan if you wanna spawn a lot of actors

-spawning more actors in the script at predefined coords

-spawning more actors in the script in relation to player position

-let the same cs-script running in multiple instances

-writing a missionscript by creating a cleo.cm file to have more local variables and can do more

 

Then you should decide what the actors should do if they reach their destination

therefore you must check if the he reached the point

Edited by ZAZ

Share this post


Link to post
Share on other sites
kal-el5676

Thank you so much zaz. just a few more questions. How do i get the actor to act aggressive toward the player? Also can the actor be summoned while in a vehicle (aircraft also) as well as on foot? And the actor runs to these points. Can we make him walk?

 

Your code modified to my mod so far:

 

 

{$CLEO .cs}:ActorWalk_103A4: name_thread 'MODL':ActorWalk_20001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @ActorWalk_200D6: if  000FF:   actor $PLAYER_ACTOR  0 (in-sphere)near_point_on_foot 0.0 0.0 0.0 radius  10.0  10.0  10.0004D: jump_if_false @ActorWalk_20247: request_model #FAM3:Load_Model_Check0001: wait  0 ms00D6: if  00248:   model #FAM3 available004D: jump_if_false @Load_Model_Check009A: [email protected] = create_actor_pedtype 22 model #FAM3 at 0.0 0.0 0.00173: set_actor [email protected] z_angle_to 0.00249: release_model #FAM30615: define_action_sequences [email protected]: clear_scmpath05D7: add_point_to_scmpath  471.5384 734.5942 1.71405D7: add_point_to_scmpath  -897.4615 -711.4058 1.727705D7: add_point_to_scmpath  889.5385 -1379.4058 1.733105D7: add_point_to_scmpath  -92.0696 -493.3648 1.7212  05D7: add_point_to_scmpath  840.9304 704.6352 1.71405D7: add_point_to_scmpath  -719.0696 665.6352 1.71305D7: add_point_to_scmpath  -719.0696 -1027.3647 2.199705D7: add_point_to_scmpath  916.9304 -969.3647 1.720405D8: AS_assign_scmpath to_actor -1 flags  7  3  0616: define_action_sequences_end [email protected]: assign_actor [email protected] to_action_sequences [email protected]: remove_references_to_AS_pack [email protected]:ActorWalk_30001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @ActorWalk_3if  or Actor.Dead([email protected])80FF:   NOT   actor $PLAYER_ACTOR  0 ()near_point_on_foot 0.0 0.0 0.0 radius  100.0  100.0  2.0004D: jump_if_false @ActorWalk_301C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @ActorWalk_2

 

Share this post


Link to post
Share on other sites
ZAZ

 

Thank you so much zaz. just a few more questions. How do i get the actor to act aggressive toward the player? Also can the actor be summoned while in a vehicle (aircraft also) as well as on foot? And the actor runs to these points. Can we make him walk?

The usual opcode to act the actor aggressive toward the player is 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

You have it in your first script.

The actor will then be assigned to an exe coded routine.

He do nothing if the distance is to big, he goes in cover, follows player

and exit also the vehicle.

 

The opcode 05D3: AS_actor [email protected] goto_point let the actor also exit the vehicle

 

Try the script below:

Actor and car will be spawned in Grovestreet

Actor enters car and drive to a point, ca. 30 meters beside the spawn location

you can brake the drive with keypress Backspace

 

play around with the codes

 

//05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR//0633: AS_actor [email protected] exit_vehicle05D3: AS_actor [email protected] goto_point 2500.7986 -1672.2833 13.3518 mode 4 999999 ms // versionA

 

deactivate the goto_point code and activate another code

 

 

{$CLEO .cs}:Action03A4: name_thread 'AKT':StartLoop_10001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @StartLoop_100D6: if  000FE:   actor $PLAYER_ACTOR  1 (in-sphere)near_point 2498.84 -1666.013  13.4 radius  3.0  3.0  3.0  004D: jump_if_false @StartLoop_10247: request_model #COLT450247: request_model #FAM10247: request_model #BULLET:LoadModel_10001: wait  0 ms00D6: if  20248:   model #COLT45 available0248:   model #FAM1 available0248:   model #BULLET available004D: jump_if_false @LoadModel_1009A: [email protected] = create_actor  24 #fam1 at  2472.02  -1668.41  13.40173: set_actor [email protected] z_angle_to  270.001B2: give_actor [email protected] weapon  22 ammo  99999  // Load the weapon model before using this 00A5: [email protected] = create_car #BULLET at  2472.4994  -1659.546  13.40175: set_car [email protected] z_angle_to  205.00249: release_model #fam10249: release_model #BULLET0249: release_model #COLT4505CB: AS_actor [email protected] enter_car_as_driver [email protected] delay  10000:Loop_20001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @CleanUp100D6: if  18119:   NOT   car [email protected] wrecked8118:   NOT   actor [email protected] dead004D: jump_if_false @CleanUp100D6: if  000DB:   actor [email protected] in_car [email protected]: jump_if_false @Loop_200A7: car [email protected] drive_to  2502.112 -1664.745  13.400AD: set_car [email protected] max_speed_to  20.0:Loop_30001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @CleanUp100D6: if  18119:   NOT   car [email protected] wrecked8118:   NOT   actor [email protected] dead004D: jump_if_false @CleanUp1if  or0AB0:   key_pressed 8// key = Backspace01AF:   car [email protected]  0 ()near_point  2502.112 -1664.745  13.4 radius  2.0  2.0  2.0004D: jump_if_false @Loop_3//05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR//0633: AS_actor [email protected] exit_vehicle05D3: AS_actor [email protected] goto_point 2500.7986 -1672.2833 13.3518 mode 4 999999 ms // versionA:Loop_40001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @CleanUp100D6: if  18119:   NOT   car [email protected] wrecked8118:   NOT   actor [email protected] dead004D: jump_if_false @CleanUp100D6: if  080DB:   NOT   actor [email protected] in_car [email protected]: jump_if_false @Loop_4//05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR:Loop_50001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @CleanUp100D6: if  210119:   car [email protected] wrecked0118:   actor [email protected] dead004D: jump_if_false @Loop_5:CleanUp101C2: remove_references_to_actor [email protected]  // Like turning an actor into a random pedestrian01C3: remove_references_to_car [email protected]  // Like turning a car into any random car0002: jump @StartLoop_1

 

Share this post


Link to post
Share on other sites
kal-el5676

I appreciate the extra info zaz! However, I'm still having a few problems. Basically i'm trying to use this as a spawn script for my Dino's in the new JP mod. So i don't really want them driving cars or shooting guns. wink.gif So far i have almost got it worked out but... when I'm driving/walking around the map, I'd like them to spawn from a far enough distance that you can't really see them just appear. This works on foot when i increase the radius but not in a car. Would it also be possible to have them spawn as you fly overhead? The aggression is working and so is the scm path although they do run sometimes still. And also lets say that cj is within the ped spawning radius, when i get in and out of a car they spawn over and over which isn't so bad if your far enough away. Just didn't know if you had an easy solution. I really appreciate your help and patients. For some reason this seems to be a tough concept for me to grasp this whole coding thing.

 

biggrin.gif

Share this post


Link to post
Share on other sites
ZAZ

 

I appreciate the extra info zaz! However, I'm still having a few problems. Basically i'm trying to use this as a spawn script for my Dino's in the new JP mod. So i don't really want them driving cars or shooting guns. wink.gif So far i have almost got it worked out but...  when I'm driving/walking around the map, I'd like them to spawn from a far enough distance that you can't really see them just appear. This works on foot when i increase the radius but not in a car. Would it also be possible to have them spawn as you fly overhead? The aggression is working and so is the scm path although they do run sometimes still. And also lets say that cj is within the ped spawning radius, when i get in and out of a car they spawn over and over which isn't so bad if your far enough away. Just didn't know if you had an easy solution. I really appreciate your help and patients. For some reason this seems to be a tough concept for me to grasp this whole coding thing.

 

biggrin.gif

Dinos in JP, how interessting.

Well yes, it's an old problem, how to spawn the actor relativ to player but don't show the spawning, especially where.

Btw. i don't know what you mean with "spawn as you fly overhead?"

 

The first method would be to spawn at fixed defined coords and check if player is near in that area.

But check additional if player is near the spawn location to prevent the spawn because it can be observed.

That will be a lot of work depending to the plan how many spawn location should be done.

And at the end it will happen that you see it though.

 

Another method is to spawn relative with opcode 04C4: with bigger distance and maybe a bit in the air

I tested a zombiemod which used that method. It was not bad but had the disadvantage that the actor can stuck in buildings or is captured in a garden

 

I worked also with zombiescripts and if you know my Cleo_Zombie_Alarm, I let them crawling out of the ground

I think the best way to get the spawnlocation is reading the position of a random actor or random car because they are always on the save traffic paths but this requires to have paths and traffic.

 

For my unreleased zomiescript i used an extended method of reading coords of actor and car in traffic.

I made a stripped version as example:

The script reads the coords behind the camera view field to find there a random ped and spawn the actor 0.5 units behind him.

If the random ped drives a vehicle it spawns the actor 2.5 units beside the ped.

 

If player is driving it will be more difficult.

In that case the script catches a random car in a field with minimum distance of 70.0 units infront of player

Try to increase the Y-offset of 70.0 but i think it's the optimum and 100.0 should be the maximum

If player drives slow it will be good

If player drives fast it can be seen perhaps

If player drives very fast there is no chance and it also makes no sense

 

 

Try the sript below, I assume that you have the required paths and traffic.

Shure the actor isn't a dino but the example with the actor which kills the player shows the effect of the spawning

and the command to kill player give it more dynamic alien.gif

Set the marker mode to 2 because with marker above actor you will see him in any case if you drive fast

 

{$CLEO .cs}:Spawn_by_random_actor_or_carthread 'SPAWNAC':Spawn_10001: wait 0 ms if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @Spawn_1077E: get_active_interior_to [email protected]  and//-----check several situations when the spawning don't makes sense0039:   [email protected] ==  0  // integer values8965:  not actor $PLAYER_ACTOR swimming 84A7:   not actor $PLAYER_ACTOR driving_boat 89AE:   not actor $PLAYER_ACTOR driving_train 004D: jump_if_false @Spawn_1  0819: [email protected] = actor $PLAYER_ACTOR distance_from_ground if 0023:   20.0 > [email protected] 004D: jump_if_false @Spawn_10006: [email protected] =  -1  // integer valuesif00DF: actor $PLAYER_ACTOR driving004D: jump_if_false @Spawn_30050: gosub @Spawn_searchCarsub_1//leads the readingprocess to a subscript//the readingprocess continues here with reading as soon as the return of the subscript is readedif8039:   NOT   [email protected] ==  -1  // checks if a radondom actor was found to get his coords004D: jump_if_false @Spawn_10006: [email protected] =  -1  // integer values0002: jump @Spawn_Actor1:Spawn_30050: gosub @Spawn_searchPedsub_1//leads the readingprocess to a subscript//the readingprocess continues here with reading as soon as the return of the subscript is readedif8039:   NOT   [email protected] ==  -1  // checks if a radondom actor was found to get his coords004D: jump_if_false @Spawn_101C2: remove_references_to_actor [email protected]: [email protected] =  -1  // integer values0002: jump @Spawn_Actor1:Spawn_Actor10247: request_model #WMOICE0247: request_model #AK47:Spawn_Actor30001: wait  0 ms00D6: if  and0248:   model #WMOICE available0248:   model #AK47 available004D: jump_if_false @Spawn_Actor3009A: [email protected] = create_actor  24 #WMOICE at  [email protected] [email protected] [email protected]: set_actor [email protected] z_angle_to  0.001B2: give_actor [email protected] weapon  30 ammo  99999  // Load the weapon model before using this02E2: set_actor [email protected] weapon_accuracy_to  100//decrease this value if you don't want to be killed0223: set_actor [email protected] health_to  10000946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1 060B: set_actor [email protected] decision_maker_to 320187: [email protected] = create_marker_above_actor [email protected] 018B: set_marker [email protected] radar_mode 3//set marker to mode 2 to show it only on radar05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0249: release_model #WMOICE:Spawn_action_Loop0001: wait 0 ms if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @Spawn_Cleanupif and8118:   NOT   actor [email protected] dead0104:   actor $PLAYER_ACTOR near_actor [email protected] radius  80.0  80.0  10.0 sphere  0004D: jump_if_false @Spawn_Cleanup0002: jump @Spawn_action_Loop:Spawn_Cleanup0164: disable_marker [email protected]: remove_references_to_actor [email protected]:Spawn_Restart// an extra loop to give a delay after Player respawn0001: wait 0 ms if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @Spawn_Restartwait 20000002: jump @Spawn_1:Spawn_searchCarsub_1//subscript must end with 0051: return04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset -100.0  70.0  0.0// increase the y-offset04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset  100.0  150.0  0.0053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]: wait  50 msif8039:   NOT   [email protected] ==  -1  // integer values004D: jump_if_false @Spawn_searchCarsub_30001: wait  50 ms0407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 1.00001: wait  50 ms00A6: destroy_car [email protected]: wait  250 ms0006: [email protected] =  1  // integer values:Spawn_searchCarsub_30051: return:Spawn_searchPedsub_1//subscript must end with 0051: returnif80E1:   not player 0 pressed_key 19004D: jump_if_false @Spawn_searchPedsub_504C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset  0.0  0.0 0.0068D: get_camera_position_to [email protected] [email protected] [email protected] 0087: [email protected] = [email protected]  // floating-point values only0087: [email protected] = [email protected]  // floating-point values only0087: [email protected] = [email protected]  // floating-point values only0087: [email protected] = [email protected]  // floating-point values only0063: [email protected] -= [email protected]  // floating-point values0063: [email protected] -= [email protected]  // floating-point values0013: [email protected] *=  -2.0  // floating-point values0013: [email protected] *=  -2.0  // floating-point values005B: [email protected] += [email protected]  // floating-point values 005B: [email protected] += [email protected]  // floating-point values0063: [email protected] -= [email protected]  // floating-point values0063: [email protected] -= [email protected]  // floating-point values0013: [email protected] *=  -15.0  // floating-point values0013: [email protected] *=  -15.0  // floating-point values005B: [email protected] += [email protected]  // floating-point values 005B: [email protected] += [email protected]  // floating-point values08E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 31.5 handle_as [email protected]: wait  50 msif8039:   NOT   [email protected] ==  -1  // integer values004D: jump_if_false @Spawn_searchPedsub_5if00DF: actor [email protected] driving004D: jump_if_false @Spawn_searchPedsub_304C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset -2.5 0.0 0.50002: jump @Spawn_searchPedsub_5:Spawn_searchPedsub_304C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset -0.5 0.0 0.0 :Spawn_searchPedsub_50051: return

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
kal-el5676

Thats an awesome code zaz! It works well, unfortunately in my mod i have the blank path nodes installed. I would try to add new ped paths, but all the links to ashcrafts path editor are dead. Perhaps your first suggestion? I don't have many buildings and no gardens so that might work.

 

Spawn as you fly overhead, meaning if your in a plane flying low enough that the ped will spawn.

 

BTW, did you ever release a version of your zombie alarm with no fire and perhaps a zombie attack?

Edited by kal-el5676

Share this post


Link to post
Share on other sites
ZAZ

 

Thats an awesome code zaz! It works well, unfortunately in my mod i have the blank path nodes installed. I would try to add new ped paths, but all the links to ashcrafts path editor are dead.

download APE 1.1

 

 

Perhaps your first suggestion? I don't have many buildings and no gardens so that might work.

You mean my second suggestion, let it rain dinos in relation to player position

 

 

Spawn as you fly overhead, meaning if your in a plane flying low enough that the ped will spawn.

plane is fast, then my first suggestion would be better

spawn at fixed defined coords and check if player is near in that area, radius of maybe 300.0 or max. 500.0

 

 

BTW, did you ever release a version of your zombie alarm with no fire and perhaps a zombie attack?

No, it's to complicated

Share this post


Link to post
Share on other sites
kal-el5676

 

 

Perhaps your first suggestion? I don't have many buildings and no gardens so that might work.

You mean my second suggestion, let it rain dinos in relation to player position

 

 

Spawn as you fly overhead, meaning if your in a plane flying low enough that the ped will spawn.

plane is fast, then my first suggestion would be better

spawn at fixed defined coords and check if player is near in that area, radius of maybe 300.0 or max. 500.0

 

 

BTW, did you ever release a version of your zombie alarm with no fire and perhaps a zombie attack?

No, it's to complicated

Would there perhaps be a way to write 2 separate scripts 1 for letting it "rain dino's" tounge.gif and one for spawning in the radius? That sounds best.

 

And yeah, too bad about the zombie alarm, however it is amazing work my friend. wink.gif

 

And also i suppose thanks to your mirrored download, your last code example would work beautifully as well if i were to getmy paths working correctly.

Edited by kal-el5676

Share this post


Link to post
Share on other sites
ZAZ

 

Perhaps your first suggestion? I don't have many buildings and no gardens so that might work.

You mean my second suggestion, let it rain dinos in relation to player position

 

 

Spawn as you fly overhead, meaning if your in a plane flying low enough that the ped will spawn.

plane is fast, then my first suggestion would be better

spawn at fixed defined coords and check if player is near in that area, radius of maybe 300.0 or max. 500.0

 

 

BTW, did you ever release a version of your zombie alarm with no fire and perhaps a zombie attack?

No, it's to complicated

Would there perhaps be a way to write 2 separate scripts 1 for letting it "rain dino's" tounge.gif and one for spawning in the radius? That sounds best.

 

And yeah, too bad about the zombie alarm, however it is amazing work my friend. wink.gif

 

And also i suppose thanks to your mirrored download, your last code example would work beautifully as well if i were to getmy paths working correctly.

Fine.

Btw. did you made or convert the dino modells? I still have ripped files of the KingKong game.

Share this post


Link to post
Share on other sites
kal-el5676

No i did not make them. they are from the jurassic park operation genesis game.

 

Sorry, but did you already state the raining dinos code in an example?

Share this post


Link to post
Share on other sites
ZAZ

 

No i did not make them. they are from the jurassic park operation genesis game.

 

Sorry, but did you already state the raining dinos code in an example?

Haha, a script request biggrin.gif

Writing a script with one actor is easy but with more actors is advanced.

I have to use arrays and 10 actor with marker are maximum in a cs file.

More actors are possible without markers.

To understand the methods you need to dive into the themes Arrays and Math coding

 

The Dinopark script below spawns the actors in a height of 50.0 in relation to player position.

They are first unvisible and immun to prevent their dead.

The timercheck for [email protected] gives acces to make them visible and unimmun

So it have allways a delay till they appear.

They get then the command to walk along scm paths.

If an actor dies, he will be refreshed, same by other condition like if he is not near 180.0

After refreshing it needs again a time check till he appears.

So if you kill more actors in a row the timer will be reseted and you have to wait till the last actor is refreshed inclusiv the timechck-delay till the refreshed actor appear.

You can observe this clearly when you drive over the map and the actors disappear which are to far away

After a while they appear again in a group

 

Using a teleporter causes a bug and all actor stucking inside each other in the air.

 

 

{$CLEO .cs}:DinoPark03A4: name_thread 'DINOPK'wait 20000006: [email protected] =  0  // Array index:DINOPK_20001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @DINOPK_2//if//0AB0:   key_pressed 57//----------------key 9//004D: jump_if_false @DINOPK_2077E: get_active_interior_to [email protected]  and8965:  not actor $PLAYER_ACTOR swimming 84A7:   not actor $PLAYER_ACTOR driving_boat 89AE:   not actor $PLAYER_ACTOR driving_train  0039:   [email protected] ==  0  // integer values004D: jump_if_false @DINOPK_20819: [email protected] = actor $PLAYER_ACTOR distance_from_ground 0001: wait 0 ms 00D6: if 0023:   20.0 > [email protected] 004D: jump_if_false @DINOPK_20247: request_model #WMOICE:DINOPK_30001: wait  0 msif   and0248:   model #WMOICE available004D: jump_if_false @DINOPK_30007: [email protected] = 0.0wait 2000:DINOPK_40001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @DINOPK_4if001B:    10 > [email protected]  // integer values004D: jump_if_false @DINOPK_1002F6: [email protected] = cosine [email protected]  // sinus swapped with cosine0013: [email protected] *= 120.0  // floating-point values 02F7: [email protected] = sinus [email protected] // cosine swapped with sinus 0013: [email protected] *= 120.0  // floating-point values000B: [email protected] += 36.0 04C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset [email protected]  [email protected]  50.2009A: [email protected]([email protected],12i) = create_actor_pedtype 24 model #WMOICE at [email protected] [email protected] [email protected]: set_actor [email protected]([email protected],12i) drowns_in_water 10946: set_actor [email protected]([email protected],12i) actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected]([email protected],12i) decision_maker_to 320489: set_actor [email protected]([email protected],12i) muted 103FE: set_actor [email protected]([email protected],12i) money 00337: set_actor [email protected]([email protected],12i) visibility 0 02AB: set_actor [email protected]([email protected],12i) immunities BP 1 FP 1 EP 1 CP 1 MP 1 0187: [email protected]([email protected],12i) = create_marker_above_actor [email protected]([email protected],12i)018B: set_marker [email protected]([email protected],12i) radar_mode 0//set marker to mode 2 to show it only on radar 000A: [email protected] +=  1  // Array index0002: jump @DINOPK_4:DINOPK_100006: [email protected] =  0  // Array index0006: [email protected] =  0  // reset timer:DINOPK_110001: wait  0 msif0256:   player $PLAYER_CHAR defined004D: jump_if_false @DINOPK_40077E: get_active_interior_to [email protected]  and 89AE:   not actor $PLAYER_ACTOR driving_train  0039:   [email protected] ==  0  // integer values004D: jump_if_false @DINOPK_400819: [email protected] = actor $PLAYER_ACTOR distance_from_ground 0001: wait 0 ms 00D6: if 0023:   50.0 > [email protected] 004D: jump_if_false @DINOPK_40if  [email protected] > 700010000 > [email protected]: jump_if_false @DINOPK_120002: jump @DINOPK_30:DINOPK_12//if//8AB0:   not key_pressed 57//----------------key 9//004D: jump_if_false @DINOPK_40if001B:    10 > [email protected]  // integer values004D: jump_if_false @DINOPK_19if8039:   not [email protected]([email protected],12i) ==  -1  // integer values004D: jump_if_false @DINOPK_17if or0118:  actor [email protected]([email protected],12i) dead8104:   not actor $PLAYER_ACTOR near_actor [email protected]([email protected],12i) radius  180.0  180.0  100.0 sphere  0 004D: jump_if_false @DINOPK_170164: disable_marker [email protected]([email protected],12i)01C2: remove_references_to_actor [email protected]([email protected],12i)if  or04A7:   actor $PLAYER_ACTOR driving_boat0965:   actor $PLAYER_ACTOR swimming004D: jump_if_false @DINOPK_130006: [email protected]([email protected],12i) = -1:[email protected] > 350.0004D: jump_if_false @DINOPK_150007: [email protected] = 0.0:DINOPK_1502F6: [email protected] = cosine [email protected]  // sinus swapped with cosine0013: [email protected] *= 120.0  // floating-point values 02F7: [email protected] = sinus [email protected] // cosine swapped with sinus 0013: [email protected] *= 120.0  // floating-point values000B: [email protected] += 36.004C4: create_coordinate [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR offset [email protected]  [email protected]  50.2009A: [email protected]([email protected],12i) = create_actor_pedtype 24 model #WMOICE at [email protected] [email protected] [email protected]: set_actor [email protected]([email protected],12i) drowns_in_water 10946: set_actor [email protected]([email protected],12i) actions_uninterupted_by_weapon_fire 1060B: set_actor [email protected]([email protected],12i) decision_maker_to 320489: set_actor [email protected]([email protected],12i) muted 103FE: set_actor [email protected]([email protected],12i) money 00337: set_actor [email protected]([email protected],12i) visibility 0 02AB: set_actor [email protected]([email protected],12i) immunities BP 1 FP 1 EP 1 CP 1 MP 1 0187: [email protected]([email protected],12i) = create_marker_above_actor [email protected]([email protected],12i)018B: set_marker [email protected]([email protected],12i) radar_mode 0//set marker to mode 2 to show it only on radar000A: [email protected] +=  1  // Array index0006: [email protected] =  0  // reset timer0002: jump @DINOPK_11:DINOPK_17000A: [email protected] +=  1  // Array index0002: jump @DINOPK_11:DINOPK_190006: [email protected] =  0  // Array index0002: jump @DINOPK_11:DINOPK_300006: [email protected] =  0  // Array index:DINOPK_35wait 0if001B:    10 > [email protected]  // integer values004D: jump_if_false @DINOPK_39if8039:   not [email protected]([email protected],12i) ==  -1  // integer values004D: jump_if_false @DINOPK_37if8118:  not actor [email protected]([email protected],12i) dead004D: jump_if_false @DINOPK_370337: set_actor [email protected]([email protected],12i) visibility 1 02AB: set_actor [email protected]([email protected],12i) immunities BP 0 FP 0 EP 0 CP 0 MP 00208: [email protected] = random_float_in_ranges -50.2 50.2 04C4: create_coordinate [email protected] [email protected] [email protected] from_actor [email protected]([email protected],12i) offset 20.0  [email protected]  0.00208: [email protected] = random_float_in_ranges -50.2 50.2 04C4: create_coordinate [email protected] [email protected] [email protected] from_actor [email protected]([email protected],12i) offset -20.0  [email protected]  0.005D6: clear_scmpath05D7: add_point_to_scmpath  [email protected] [email protected] [email protected]: add_point_to_scmpath  [email protected] [email protected] [email protected]: AS_assign_scmpath to_actor [email protected]([email protected],12i) flags  4  2  018B: set_marker [email protected]([email protected],12i) radar_mode 2//set marker to mode 2 to show it only on radar:DINOPK_37000A: [email protected] +=  1  // Array index0002: jump @DINOPK_35:DINOPK_390006: [email protected] =  0  // counter for dead actors0006: [email protected] =  0  // Array index0006: [email protected] =  110000002: jump @DINOPK_11:DINOPK_400006: [email protected] =  0  // Array index:DINOPK_45wait 0if001B:    10 > [email protected]  // integer values004D: jump_if_false @DINOPK_50if8039:   not [email protected]([email protected],12i) ==  -1  // integer values004D: jump_if_false @DINOPK_470164: disable_marker [email protected]([email protected],12i)01C2: remove_references_to_actor [email protected]([email protected],12i) // Like turning an actor into a random pedestrian:DINOPK_47000A: [email protected] +=  1  // Array index0002: jump @DINOPK_45:DINOPK_500006: [email protected] =  0  // counter for dead actors0006: [email protected] =  0  // Array index0249: release_model #WMOICE0001: wait  1000 ms0002: jump @DINOPK_2

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
Bennington

Hey ZAZ, that´s a great tutorial!

There´s one little thing I need help with:

I want to teleport the player out of an interior with opcode 04BB: select_interior 0

At first it failed, and I got into the Black Hell.

Now I found opcode 04FA: reset_interior 0 colors, and it works, but there´s still a problem: the radar stays empty.

057E: set_radar_grey 0 didn´t help, and, probably, there are more things I forgot.

Can you show me a code how a such a teleport would proceed without errors?

Thanks

 

EDIT: I found out myself now, anyway thanks!

Edited by Bennington

Share this post


Link to post
Share on other sites
ZAZ

 

Hey ZAZ, that´s a great tutorial!

There´s one little thing I need help with:

I want to teleport the player out of an interior with opcode 04BB: select_interior 0

At first it failed, and I got into the Black Hell.

Now I found opcode 04FA: reset_interior 0 colors, and it works, but there´s still a problem: the radar stays empty.

057E: set_radar_grey 0  didn´t help, and, probably, there are more things I forgot.

Can you show me a code how a such a teleport would proceed without errors?

Thanks

 

EDIT: I found out myself now, anyway thanks!

 

057E: set_radar_grey 0 is right but look, for the interior color is another opcode

 

__from outside into interior:select_interior 3 04F9: set_interior 1 color_to 0 057E: set_radar_grey 1__from interior to outside:select_interior 0 04FA: reset_interior 0 colors 057E: set_radar_grey 0

 

 

I believe, we can get rid of the radar opcode

work without opcode 057E: also by entering interiors

try the script below

press 0 to tele into PoliceDept., press again 0 to tele back, always outside

 

{$CLEO .cs}03A4: name_thread 'INTEL' :INTEL_10001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @INTEL_100D6: if  00AB0:   key_pressed 48//--------------- key 0004D: jump_if_false @INTEL_100A0: store actor $PLAYER_ACTOR position to [email protected] [email protected] [email protected]: [email protected] = actor $PLAYER_ACTOR z_angle016A: fade 0 time 1000 0001: wait 1000 ms 04E4: unknown_refresh_game_renderer_at  230.6252 76.14103CB: set_camera  230.6252 76.141 1005.0300A1: put_actor $PLAYER_ACTOR at 230.6252 76.141 1005.03 0860: link_actor $PLAYER_ACTOR to_interior 6 04BB: select_interior 60001: wait 500 ms 016A: fade 1 time 1000:INTEL_20001: wait  0 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false @INTEL_200D6: if  00AB0:   key_pressed 48//--------------- key 0004D: jump_if_false @INTEL_2016A: fade 0 time 1000 0001: wait 1000 msselect_interior 004FA: reset_interior_colors  004E4: unknown_refresh_game_renderer_at  [email protected]  [email protected]: set_camera  [email protected]  [email protected]  [email protected]: link_actor $PLAYER_ACTOR to_interior  0 00A1: put_actor $PLAYER_ACTOR at  [email protected]  [email protected]  [email protected]: set_actor $PLAYER_ACTOR z_angle_to  [email protected]: wait 500 ms 016A: fade 1 time 1000jump @INTEL_1

 

Share this post


Link to post
Share on other sites
Bennington

Thanks, ZAZ, that´s what I found out wink.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.