GTAMP.com

Grand Theft Auto Media Press
It is currently Tue Apr 24, 2018 2:25 pm

All times are UTC




Post new topic Reply to topic  [ 89 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
PostPosted: Fri Mar 16, 2018 10:12 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
Sektor wrote:
They're not read only but maybe something else has to change to trigger the game to redraw. If you try with an animated object like a rocket, it should update instantly.

I was moving the phone/police block. Model 163 and 21. But it moved only along z. I also tried to turn. Without changes. Maybe the object somewhere on the sprite where the rewritten coordinates are stored.

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 10:56 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1328
Location: GTAMP.com
Changing x and y works in an SCR script, even on a phone.

Image

Syntax: [ Download ] [ Hide ]
Using GTA2 Script Syntax Highlighting
PLAYER_PED p1 = (136.50, 149.50, 2.00) 25 0

OBJ_DATA object1
OBJ_DATA object2

COUNTER in
COUNTER out
COUNTER true = 1

COUNTER x
COUNTER x2
COUNTER y
COUNTER z


LEVELSTART

object1 = CREATE_OBJ (137.5, 149.5, 2.0) 0 phone END
object2 = CREATE_OBJ (137.5, 149.5, 2.0) 0 phone END

WHILE_EXEC ( true = 1 )

GIVE_WEAPON (p1,ROCKET_LAUNCHER)

//IF (IS_CHAR_FIRING_ONSCREEN (p1))
//DELETE_ITEM (object1)
//DELETE_ITEM (object2)
object1 = CREATE_OBJ (137.5, 149.5, 2.0) 0 phone END
SET in = (object1+4)
CHANGE_GANG_CHAR_RESPECT (in,out,104)
SET in = (out+20)
CHANGE_GANG_CHAR_RESPECT (in,x,114)
SET in = (out+24)
CHANGE_GANG_CHAR_RESPECT (in,y,114)
SET in = (out+28)
CHANGE_GANG_CHAR_RESPECT (in,z,114)

/*
object2 = CREATE_OBJ (137.5, 149.5, 2.0) 180 phone END
SET in = (object2+4)
CHANGE_GANG_CHAR_RESPECT (in,out,104)
SET in = (out+20)
CHANGE_GANG_CHAR_RESPECT (in,x2,114)
SET in = (out+24)
CHANGE_GANG_CHAR_RESPECT (in,y,114)
SET in = (out+28)
CHANGE_GANG_CHAR_RESPECT (in,z,114)
*/


//ENDIF

SET in = (p1+428)
CHANGE_GANG_CHAR_RESPECT (in,out,104)
SET x = (out+5000)
SET x2 = (out+10000)

SET in = (p1+432)
CHANGE_GANG_CHAR_RESPECT (in,out,104)
SET y = (out+0)

SET in = (p1+436)
CHANGE_GANG_CHAR_RESPECT (in,out,104)
SET z = (out+0)

ENDWHILE

LEVELEND
 
Parsed in 0.010 seconds, using GeSHi 1.0.8.10


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 11:00 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
Is it the creation of a new object or movement of the same? You can look at the sample code.

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 11:04 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1328
Location: GTAMP.com
My script creates new phone at the same coordinates and then moves that phone.


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 11:11 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
Sektor wrote:
My script creates new phone at the same coordinates and then moves that phone. That might make a difference.

It is necessary to create out of cycle 1 the phone, after moving it in a cycle. Is it moving (not re-creating models)?

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 11:14 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1328
Location: GTAMP.com
I tested trying to move without creating a new object but it doesn't move x and y, I don't know why.


Top
 Profile  
 
PostPosted: Fri Mar 16, 2018 11:22 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
Sektor wrote:
I tested trying to move without creating a new object but it doesn't move x and y, I don't know why.

That's what I wrote about it. Coordinates x, y, rotation in the object is read-only. Yes, you might need a trigger that involves redrawing the object. But the coordinate z exclusion it changes when the animation is turned on (the object becomes higher than other objects - I noticed it when the phone call was turned on).

Added:

The same thing I noticed happening to a car when it is devoid of physics (hanging in air) Its coordinates can not be changed. Conclusion: objects are devoid of physics because they themselves do not redraw.

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Wed Mar 21, 2018 6:13 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
Sector, do you have an address for e.GXT? similar to this viewtopic.php?f=4&t=1124#p10549

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Fri Apr 13, 2018 7:10 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
Does anyone have an working address for check the player's arrest (busted)?

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 89 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group