Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. 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. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
yair1221

Game Crashes With 'Move Object'

Recommended Posts

yair1221

 

{$CLEO}thread 'Gate':1wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object $BASEGATE to 2337.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @2:2 wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object $BASEGATE to 2327.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @1 

 

 

Why does the game keep crashing?

I created the gate in the main.scm.

It exists, I saw it,If I remove this script from the folder,The game will work fine

Share this post


Link to post
Share on other sites
yair1221

1.So create it in the script itself then?

2.Yes I know I want it to be fast

Share this post


Link to post
Share on other sites
james227uk

Yes, put it in the script itself.

 

Although it may be the global variable crashing it. Happened to me before, so it's a reasonable guess. I fixed it by changing the global to a local variable

Share this post


Link to post
Share on other sites
yair1221

still doesnt work

 

 

{$CLEO}thread 'Gate'model.Load(980)[email protected] = object.Create(980, 2327.53, 1543.17, 10.5)03BC: [email protected] = create_sphere_at 2327.53 1543.17 12.5 radius 5.0:1wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2337.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @2:2 wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2327.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @1 

 

Edited by yair1221

Share this post


Link to post
Share on other sites
Deji

It means that Sanny can't use model names in this script, because of the type of model it is and because you've not defined it in the main.scm. OK, this is really annoying... Firefox won't let me make a newline with the return key --- Click on the model name and hit Ctrl+Alt+H to convert it to a model number, then re-compile. Firefox sucks.

Share this post


Link to post
Share on other sites
yair1221

still doesnt works

ive used numbers but the game crashes every time

Share this post


Link to post
Share on other sites
Deji

What you mean is it did work, but now you are having a seperate problem... I never actually took the time to look at your script.

model.Load(980)

You must check if the model has loaded before creating it. Add this above that line:

:LOADLOOP

and this below it:

if [NEW LINE] 0248:   model 980 loaded [NEW LINE] else_jump @LOADLOOP

And excuse Firefox's crappiness confused.gif

Share this post


Link to post
Share on other sites
yair1221

 

And excuse Firefox's crappiness

 

hhh Im using CometBird it is one of the fastest browsers EVER

Share this post


Link to post
Share on other sites
yair1221

sorry i dont have the patience to read all that huge code...

besides,from what i got:

he did the same as me except he used variables

Share this post


Link to post
Share on other sites
ZAZ

 

still doesnt works

ive used numbers but the game crashes every time

 

 

{$CLEO}thread 'Gate'model.Load(980)[email protected] = object.Create(980, 2327.53, 1543.17, 10.5)03BC: [email protected] = create_sphere_at 2327.53 1543.17 12.5 radius 5.0:1wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2337.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @2:2wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2327.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @1 

 

it works for me

when does it crash? at gameload?

Share this post


Link to post
Share on other sites
yair1221

it realy works?

anyway: no other scripts use that button

Share this post


Link to post
Share on other sites
ZAZ
it realy works?

yes, and by keypressing the gate is flickering because the first and second conditional checks are the same

Share this post


Link to post
Share on other sites
yair1221

no it doesnt works for me

Share this post


Link to post
Share on other sites
BnB

Have you change it?

Share this post


Link to post
Share on other sites
yair1221

heres my current script:

 

 

{$CLEO}thread 'Gate':LOADLOOPmodel.Load(980)if 0248:   model 980 loadedelse_jump @[email protected] = object.Create(980, 2327.53, 1543.17, 10.5)03BC: [email protected] = create_sphere_at 2327.53 1543.17 12.5 radius 5.0:1wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2337.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1wait 3000jump @2:2 wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2327.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @1 

 

Share this post


Link to post
Share on other sites
ZAZ
heres my current script:

 

 

{$CLEO}thread 'Gate':LOADLOOPmodel.Load(980)if 0248:   model 980 loadedelse_jump @[email protected] = object.Create(980, 2327.53, 1543.17, 10.5)03BC: [email protected] = create_sphere_at 2327.53 1543.17 12.5 radius 5.0:1wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2337.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1wait 3000jump @2:2 wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2327.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @1 

 

works also

Share this post


Link to post
Share on other sites
yair1221

come ON!

are you f***ing kidding me?!

it doesnt works,it crashes

i also added wait after :loadloop

still doesnt work

 

 

{$CLEO}thread 'Gate'model.Load(980):LOADLOOPwait 0if 0248:   model 980 loadedelse_jump @[email protected] = object.Create(980, 2327.53, 1543.17, 10.5)03BC: [email protected] = create_sphere_at 2327.53 1543.17 12.5 radius 5.0:1wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2337.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1wait 3000jump @2:2 wait 0if and0102:   actor $PLAYER_ACTOR in_sphere 2327.53 1543.17 12.5 radius 5.0 5.0 5.0 sphere 1 stopped0AB0:  key_pressed 72jf @1034E: move_object [email protected] to 2327.53 1543.17 10.5 speed 2.0 2.0 2.0 flag 1jump @1 

 

Share this post


Link to post
Share on other sites
BnB

Then use THIS

Share this post


Link to post
Share on other sites
yair1221

edit:

i tried removing the script from the folder and the game still crashed!

so the script isnt the problem at al!!

Edited by yair1221

Share this post


Link to post
Share on other sites
coin-god
Wich means we are not f*cking kdding you. Try in afresh install or fix the problem before complaining.

Share this post


Link to post
Share on other sites
yair1221

I was just spending some nerves angry.gif ,it was frustrating

And I also fixed the problem,but now it works part time,every time I press H it moves a little to the right

But I need like 10 hits to move it competely

I can make it move faster by changing its speed to 10.0 but then there will be no animation

It will just pop up at the target

Share this post


Link to post
Share on other sites
ZAZ

 

I was just spending some nerves angry.gif ,it was frustrating

And I also fixed the problem,but now it works part time,every time I press H it moves a little to the right

But I need like 10 hits to move it competely

I can make it move faster by changing its speed to 10.0 but then there will be no animation

It will just pop up at the target

 

Then use THIS

The move opcode must run in a loop

BnB posted the link to a useful template

Edited by ZAZ

Share this post


Link to post
Share on other sites
yair1221

oh

i used it in 100 times

 

 

034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.0 0.0 flag 0wait 5034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.0 0.0 flag 0wait 5034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.0 0.0 flag 0wait 5034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.0 0.0 flag 0wait 5

 

 

etc... it goes on and on to 400 lines

200 for each position of the gate

Share this post


Link to post
Share on other sites
TheSiggi

:S what a waste of bytes.... confused.gif

 

 

look at this script

 

 

{$CLEO .cs}0107: [email protected] = create_object 2933 at 2481.42 -1721.91 13.2781 0177: set_object [email protected] Z_angle_to 180.0 :Noname_330001: wait 10 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @Noname_33 00D6: if and03EE:   player $PLAYER_CHAR controllable 0583:   player $PLAYER_CHAR in_zone 'LA' 004D: jump_if_false @Noname_33 :Noname_830001: wait 0 ms 00D6: if and03CA:   object [email protected] exists 00EC:   actor $PLAYER_ACTOR 0 near_point 2481.42 -1721.91 radius 10.0 10.0 004D: jump_if_false @Noname_174 034E: move_object [email protected] to 2487.72 -1721.91 13.2781 speed 0.2 0.0 0.0 flag 0 0002: jump @Noname_83 :Noname_174034E: move_object [email protected] to 2481.42 -1721.91 13.2781 speed 0.2 0.0 0.0 flag 0 0002: jump @Noname_33 

 

 

as you can see, the script runs in a loop:

 

Share this post


Link to post
Share on other sites
yair1221

ohhh

niccce thank you!!

made my code much easier,hard to scroll throught 500 lines tounge2.gif

by the way:

does the command 0395: clear_area 1 at Y Z radius 500.0 erases MY cars too?

I mean,does it erases cars with references?

because there is an area i fenced but it always filled with cars

i want all the cars to disappear and the only way out to be through that gate

is it possible?

Share this post


Link to post
Share on other sites
yair1221

and if i have a car that i created like that:

[email protected] = car.create(L, X, Y, Z)

the car will erase itself?

Share this post


Link to post
Share on other sites
TheSiggi
I think the gate will be removed aswell as the car created with 00A5:

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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