Game Development Reference
In-Depth Information
The BulletImpact event
An event similar to the BulletShot event can be sent out when a bullet impacts a loca-
tion:
AgentCommunications.lua :
AgentCommunications.EventType.BulletImpact = "BulletImpact";
Soldier.lua :
local function SendImpactEvent(sandbox, hitPosition)
local event = { position = hitPosition };
AgentCommunications_SendMessage(
sandbox,
AgentCommunications.EventType.BulletImpact,
event);
end
local function ParticleImpact(sandbox, collision)
...
SendImpactEvent(sandbox, collision.pointA);
end
Search WWH ::




Custom Search