CastObjects
Category: Objects
/ Creation
Since engine version: 4.6.5.0 CP
Description
Casts the specified amount of objects at the specified position at the given speed. In local calls the created objects will have the owner of the calling object.
Syntax
void CastObjects
(id id, int iNumber, int iLevel, int iX, int iY);
Parameters
- id:
Type of objects to be casted
- iNumber:
Number of objects.
- iLevel:
Velocity of the objects
- iX:
[opt]
X casting position. In local calls offset to the calling object.
- iY:
[opt]
Y casting position. In local calls offset to the calling object.
Example
var num=GetVertexNum()-1;
CastObjects(SPRK,1,20,GetVertex(num, 0)-GetX(), GetVertex(num, 1)-GetY());
Creates a spark at the last vertex of a line. With multiple calls this will create the same effect as a lightning strike.
Günther, Februar 2002