Jump to content

createShadow


Recommended Posts

createShadow function

 createShadow ( float posX, float posY, float posZ [float rotX, float rotY, float rotZ,  int r=255, int g=255, int b=255, bool floorAttach] ) 

Required Arguments

posX, Y, Z : the world coordinates where the shadow originates

Optional arguments

rotX, Y, Z: Shadow rotation, default 0, 0, 0

r, g, b: Red, Green, Blue shadow color, default 0, 0, 0

floorAttach: set True if element will be attached to floor, false if not

make this function compatible with attachElements (for attach elements to player)

example:

g_Player = getLocalPlayer() 
g_Vehicle = getPedOccupiedVehicle ( g_Player ) 
  
function createshadow() 
    outputChatBox ("Purple shadow created!!", g_Player, 255, 0, 255, false) 
    local shadow = createShadow (0, 0, 0, 0, 0, 0, 255, 0, 255, true) 
    attachElements (shadow, g_Vehicle, 0, 0, 0 ) 
end 
addCommandHandler ("purpleshadow", createshadow) 

Link to comment

And how can you choose the shape of your shadow ?

BTW , this is possible in 3ds max

.................................................................................................................................................

Shadow Mesh

The so-called "shadow mesh" introduced with version 3 is used to cast real-time shadows in GTA SA. Again, to save cpu time these are reduced to significant parts of the object, like bridges on map parts. Very important is that they always have to be closed! If there are holes in your mesh, you will get odd projection errors, with shadow triangles floating around.

found on http://www.gtamodding.com/index.php?tit ... ision_File

.................................................................................................................................................

In the map digital desert , my pillars have a dynamic shadow. (the shadow disappear if the object is above the sea.)

Link to comment
And how can you choose the shape of your shadow ?

BTW , this is possible in 3ds max

.................................................................................................................................................

Shadow Mesh

The so-called "shadow mesh" introduced with version 3 is used to cast real-time shadows in GTA SA. Again, to save cpu time these are reduced to significant parts of the object, like bridges on map parts. Very important is that they always have to be closed! If there are holes in your mesh, you will get odd projection errors, with shadow triangles floating around.

found on http://www.gtamodding.com/index.php?tit ... ision_File

.................................................................................................................................................

In the map digital desert , my pillars have a dynamic shadow. (the shadow disappear if the object is above the sea.)

My 3Ds max doesnt run but, i want to do this by scripting, not by DFF or TXD.

Anyway MTA has many engine bugs, so i dont think if MTA can run it...

and yh i forgot lol

Link to comment
And how can you choose the shape of your shadow ?

BTW , this is possible in 3ds max

.................................................................................................................................................

Shadow Mesh

The so-called "shadow mesh" introduced with version 3 is used to cast real-time shadows in GTA SA. Again, to save cpu time these are reduced to significant parts of the object, like bridges on map parts. Very important is that they always have to be closed! If there are holes in your mesh, you will get odd projection errors, with shadow triangles floating around.

found on http://www.gtamodding.com/index.php?tit ... ision_File

.................................................................................................................................................

In the map digital desert , my pillars have a dynamic shadow. (the shadow disappear if the object is above the sea.)

My 3Ds max doesnt run but, i want to do this by scripting, not by DFF or TXD.

Anyway MTA has many engine bugs, so i dont think if MTA can run it...

and yh i forgot lol

COL 3 file (gta sa collision file) a small one is only 1 KO, but you cant change the color and the limit is sooo small. :/

Link to comment
And how can you choose the shape of your shadow ?

BTW , this is possible in 3ds max

.................................................................................................................................................

Shadow Mesh

The so-called "shadow mesh" introduced with version 3 is used to cast real-time shadows in GTA SA. Again, to save cpu time these are reduced to significant parts of the object, like bridges on map parts. Very important is that they always have to be closed! If there are holes in your mesh, you will get odd projection errors, with shadow triangles floating around.

found on http://www.gtamodding.com/index.php?tit ... ision_File

.................................................................................................................................................

In the map digital desert , my pillars have a dynamic shadow. (the shadow disappear if the object is above the sea.)

My 3Ds max doesnt run but, i want to do this by scripting, not by DFF or TXD.

Anyway MTA has many engine bugs, so i dont think if MTA can run it...

and yh i forgot lol

COL 3 file (gta sa collision file) a small one is only 1 KO, but you cant change the color and the limit is sooo small. :/

MTA team can do the same thing that did with setVehicleHeadLightColor and the future function "change vehicle color by R, G, B"...

Link to comment
  • Recently Browsing   0 members

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