Coding

 Reply to this postStart new topic

What's the difference between 0107 & 029B?

LINK/2012
post Oct 8 2011, 11:41 PM
Post #1


I will kill you

Posts: 126
Joined: 13-May 11



What's the difference between 0107 & 029B?

Exist any opcode that create a object but no-save it when you save the game?
Go to the top of the page
 
+Quote Post
Wesser
post Oct 9 2011, 08:29 AM
Post #2


The Assistant

Posts: 84
From: Matera, IT
Joined: 16-June 11



0107 spawns an object relative to its center. 029B just leave the pivot as is. This is what I can say by viewing the internal EXE source.
Go to the top of the page
 
+Quote Post
Deji
post Oct 9 2011, 10:05 AM
Post #3


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



0107 = CREATE_OBJECT
029B = CREATE_OBJECT_NO_OFFSET

There are other opcodes similar to this. The best example is the put_actor opcodes, which I posted about here.

Only the Z coordinate is usually altered when using 0107. The game calculates the height of the object and increases the Z coord by a certain amount before placing the object. This is so, say, if you had the ground Z coordinate, the object will be created on the ground instead of right in the center of it. Wheras if you had the exact coords you wanted the object to be at, you should use the no_offset variation.

Something like that, anyway... Ignore the "init_object" thing.


--------------------
Go to the top of the page
 
+Quote Post
LINK/2012
post Oct 9 2011, 04:13 PM
Post #4


I will kill you

Posts: 126
Joined: 13-May 11



Thanks.

And in relation of the opcode that create a object but no-save it in a save game?

And 0550, what that do exactly?

This post has been edited by LINK2012: Oct 9 2011, 05:02 PM
Go to the top of the page
 
+Quote Post
Deji
post Oct 10 2011, 07:27 PM
Post #5


Coding like a Rockstar!

Group Icon

Posts: 1,468
From: ???
Joined: 28-May 09



All objects are saved and there is no opcode to prevent that... You'd have to destroy the object manually. This is why objects are generally only created in external scripts and missions.

Not sure what 0550 does exactly. Assuming the opcode definition is at all valid, I'd guess it specifies whether the object should be streamed out or not. If the flag is enabled, the object will be streamed no matter where you are in the map. If not, the object will dissapear when you aren't near it.

A possible way to test this would be to loop through the object pool and set this flag for all objects. It may cause some laggy-ness if this is what it does. If it's usable with buildings, it could be a good way to have the entire map streamed at one time.


--------------------
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

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