Jump to content

Custom Elements - why need of createObject ?


DarkLink

Recommended Posts

Hi there guys, I need to get one answer one this..

I have my edf file with informations for each custom element. and for example, I have one custom element that is grass, and that custom element have one object model on it.

When I create that custom element, it goes to .map file . but when I load my map on my server, i dont see the object itself...

But if I create the object using script... createObject(....) .. it gets okay, so why??

Edf :

  
  
"grass" friendlyname="place grass" instructions="place grass!" > 
        "position" type="coord3d" default="0,0,0" /> 
        "rotation" type="coord3d" default="0,0,0" /> 
        "647" position="!position!"  /> 

  

here it is on my .map file:

  
 "grass (1)" interior="0" posX="-421.79998779297" posY="2193.8999023438" posZ="42.299999237061" rotX="0" rotY="0" rotZ="0">
  

Thanks alot in advance !

Link to comment

That's because a custom element isn't an object. Its element type is "grass" in your map, so it's an abstract element. It doesn't have any physical representation in GTA world. You would get the same result if you created it in this way:

createElement("grass") 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...