IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 [Cleo] Tire spikes.

 
JT_Mix  
Posted: Monday, Feb 23 2009, 19:15
Quote Post


Insert Title Here
Group Icon
Group: Members
Joined: Apr 19, 2007

XXXXX



Is it possible for you to deploy tire spikes with cleo?
if so has anyone got the code?

thanks
PM
  Top
 

 
ZAZ  
Posted: Monday, Feb 23 2009, 22:53
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (JT_Mix @ Feb 23 2009, 19:15)
Is it possible for you to deploy tire spikes with cleo?
if so has anyone got the code?

thanks

you mean TEMP_STINGER2 of mission Puncture Wounds ?
I believe its not done as cleo. Its a bit of work.
Needs to place the object TEMP_STINGER2 on street and check if a car is at same coord
then deflate its tire
CODE
04FE: deflate_tire 1 on_car 0@
Users WebsitePM
  Top
 

 
PatrickW  
Posted: Tuesday, Feb 24 2009, 19:36
Quote Post


GTA Juggernaut
Group Icon
Group: Moderators
Joined: Jan 7, 2004

nl.gif

Member Award




Some years ago I created such a mod for Vice City (Stinger Drop Mod), demonj0e converted it to San Andreas. It's not a cleo script though, and that might be a bit hard as it makes extensive use of small threads and I don't think CLEO-scripts allow that.

This post has been edited by PatrickW on Tuesday, Feb 24 2009, 19:38
Users WebsitePM
  Top
 

 
2pacproducer2  
Posted: Tuesday, Feb 24 2009, 19:39
Quote Post


Mack Pimp
Group Icon
Group: Members
Joined: Jul 12, 2008

lh.gif

XXXXX



no, the script is pretty short, and using not so complicated speech. I think that could be writen as CLEO.
Users WebsitePM
  Top
 

 
PatrickW  
Posted: Tuesday, Feb 24 2009, 19:43
Quote Post


GTA Juggernaut
Group Icon
Group: Moderators
Joined: Jan 7, 2004

nl.gif

Member Award




I'm not an expert in the limitations of CLEO-scripts, but I was under the impression that you couldn't start new threads from within them.
Not based on experience, but on this text from the sannybuiulder CLEO helppages:
QUOTE (sannybuilderhelp >> CLEO3 scripts)
One file – one thread. Each CLEO-script must be made as a single thread compiled in a single file. If you need more threads for your script, use the opcodes 004F or 0A92, depending of where is that additional thread located - in the main.scm or in a separate cs-file.


But maybe an option would be to have the small "stringer-thread" in a seperate CLEO-file, and start that from the sniffer-thread with opcode 0A92. Certainly worth a try.
Users WebsitePM
  Top
 

 
PatrickW  
Posted: Tuesday, Feb 24 2009, 21:12
Quote Post


GTA Juggernaut
Group Icon
Group: Moderators
Joined: Jan 7, 2004

nl.gif

Member Award




Stinger Drop Mod for San Andreas (CLEO3 version)
Thanx to demonj0e for making the SA conversion of the original Stinger Drop Mod.

stinger_drop.txt
CODE
{$CLEO .cs}

:stinger_sniff_thread
03A4: name thread "ST_SNIF"

:stinger_sniff_loop
0001: wait  100 ms
00D6: if 0
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @stinger_sniff_loop  
00D6: if 1
00E1:   key pressed  0  17  
00DF:   actor $PLAYER_ACTOR driving
004D: jump_if_false @stinger_sniff_loop    
03C0: 10@ = actor $PLAYER_ACTOR car
0407: create coordinate 0@ 1@ 2@ from car 10@ offset  0.0 -2.5  1.0
0174: 3@ = car 10@ z_angle
0009: 3@ +=  90.0;; floating-point values
02CE: 2@ = ground z 0@ 1@ 2@
000B: 2@ += 0.1
0A92: create_custom_thread "stinger.s" 0@ 1@ 2@ 3@
0001: wait  500 ms
0002: jump @stinger_sniff_loop



stinger.txt
CODE
{$CLEO .s}
:Stinger_thread                              
0004: 32@ = 0  
029B: 7@ = init_object 2899 at 0@ 1@ 2@
0177: set object 7@ z angle to  3@
01C7: remove_object_from_mission_cleanup_list  7@
0007: 4@ = 0@
000F: 4@ -= 3.0
000B: 0@ += 3.0
0007: 5@ = 1@
000F: 5@ -= 3.0
000B: 1@ += 3.0  

repeat  
 0001: wait  250 ms
 0007: 6@ = -1
 053E: 6@ = get_random_car_with_model -1 in_rectangle_cornerA 4@ 5@ cornerB 0@ 1@
 if NOT   6@ ==  -1;; integer values
 then
   04FE: deflate_tire  0 on_car 6@
   04FE: deflate_tire  1 on_car 6@
   04FE: deflate_tire  2 on_car 6@
   04FE: deflate_tire  3 on_car 6@
 end
until 32@ > 10000
0108: destroy object 7@
0A93: end_custom_thread



Compile both files in your CLEO directory.
Start a new game, and drop stingers with "FIRE" in any vehicle.

This post has been edited by PatrickW on Tuesday, Feb 24 2009, 22:33
Users WebsitePM
  Top
 

 
cj360  
Posted: Tuesday, Feb 24 2009, 21:29
Quote Post



Group Icon
Group: Members
Joined: Sep 19, 2007

us.gif

XXXXX



You can make sperate threads in cleo bc7 did it in his mod Where would I find the ID for#TEMP_STINGER2? I don't remember
PMMSN
  Top
 

 
cj360  
Posted: Tuesday, Feb 24 2009, 21:34
Quote Post



Group Icon
Group: Members
Joined: Sep 19, 2007

us.gif

XXXXX



You beat me to it tounge.gif
You can make sperate threads in cleo bc7 did it in his mod
sry for double post blush.gif
PMMSN
  Top
 

 
JT_Mix  
Posted: Tuesday, Feb 24 2009, 21:34
Quote Post


Insert Title Here
Group Icon
Group: Members
Joined: Apr 19, 2007

XXXXX



crashes game.
PM
  Top
 

 
PatrickW  
Posted: Tuesday, Feb 24 2009, 22:05
Quote Post


GTA Juggernaut
Group Icon
Group: Moderators
Joined: Jan 7, 2004

nl.gif

Member Award




QUOTE (cj360 @ Feb 24 2009, 22:29)
You can make sperate threads in cleo bc7 did it in his mod Where would I find the ID for#TEMP_STINGER2? I don't remember

The ID of the stinger can be found in the large table at the top of a standard main.scm.
I guess not, afterall smile.gif


@JT_Mix: Did you try it with a default SA main.scm or with a modded one ?

This post has been edited by PatrickW on Tuesday, Feb 24 2009, 22:35
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Tuesday, Feb 24 2009, 22:21
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




data\maps\leveldes\levelxre.ide :
2899, temp_stinger2, temp_stinger, 100, 128
CODE
029B: 7@ = init_object 2899 at 0@ 1@ 2@


This post has been edited by ZAZ on Wednesday, Feb 25 2009, 16:51
Users WebsitePM
  Top
 

 
PatrickW  
Posted: Tuesday, Feb 24 2009, 22:34
Quote Post


GTA Juggernaut
Group Icon
Group: Moderators
Joined: Jan 7, 2004

nl.gif

Member Award




I stand corrected. That is indeed the correct value. Edited it in my post above..

ZAZ: cookie.gif
Users WebsitePM
  Top
 

 
Seemann  
Posted: Wednesday, Feb 25 2009, 04:07
Quote Post


Ruhe
Group Icon
Group: Members
Joined: Sep 3, 2004

ru.gif

Member Award




CLEO scripts only use global IDs of models. Use the Ctrl+Alt+H feature to convert a model name to ID and vice versa.

Like this:
user posted image


This post has been edited by Seemann on Wednesday, Feb 25 2009, 04:35
Users WebsitePM
  Top
 

 
PatrickW  
Posted: Wednesday, Feb 25 2009, 15:01
Quote Post


GTA Juggernaut
Group Icon
Group: Moderators
Joined: Jan 7, 2004

nl.gif

Member Award




Thanx for the tip, seeman smile.gif

Wouldn't it be possible to also support this "translation" for CLEO-scripts during compilation ?
So that you can simply use the symbolic name "#TEMP_STINGER2" in CLEO-scripts also ?
Users WebsitePM
  Top
 

 
Seemann  
Posted: Wednesday, Feb 25 2009, 16:27
Quote Post


Ruhe
Group Icon
Group: Members
Joined: Sep 3, 2004

ru.gif

Member Award




Yea, that would be useful, however I'm a supporter of that a scripter should know how the things work and why the code is compiled in a certain way. Anyway, added on the todo list. wink.gif
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Wednesday, Feb 25 2009, 17:00
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (Seemann @ Feb 25 2009, 16:27)
Yea, that would be useful, however I'm a supporter of that a scripter should know how the things work and why the code is compiled in a certain way. Anyway, added on the todo list. wink.gif

todo list. wink.gif ?? you will release a new version ?? smile.gif
and for gta4, is there anything in work or will it stay by lua? or maybe a lua editer ?
Users WebsitePM
  Top
 

 
Seemann  
Posted: Wednesday, Feb 25 2009, 18:19
Quote Post


Ruhe
Group Icon
Group: Members
Joined: Sep 3, 2004

ru.gif

Member Award




Sanny Builder and CLEO are far from completion. I still have in mind a lot of features to add for both. So, yea, new version will eventually come. As for GTA 4... let it be surprise! cool.gif
Users WebsitePM
  Top
 

 
goin-god  
Posted: Wednesday, Feb 25 2009, 23:27
Quote Post


High Roller
Group Icon
Group: $outh $ide Hoodz
Joined: Mar 18, 2007

ar.gif

Member Award




QUOTE (Seemann @ Feb 25 2009, 15:19)
Sanny Builder and CLEO are far from completion. I still have in mind a lot of features to add for both. So, yea, new version will eventually come. As for GTA 4... let it be surprise! cool.gif

Oh.. im impatient to see teh new stuff tounge.gif
Users WebsitePMMSNPlayStation Network
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG