PDA

View Full Version : Shooting and killing



JKDomination
05-10-2002, 07:14 AM
What is the cog command to make somebody shoot something at a cutscene (like blaster fire, turret fire or rail charge) and when it hits a stormtrooper (or a tusken or something) it dies?

Sylvicolus
05-10-2002, 10:25 AM
From JK specs try this (but there might be some other function needed also):

AiSetFireTarget() Control
Sets the firing target for an ai
Use: AiSetFireTarget(thingref,Target thingref);

Then to kill the thing in the cutscene use:

DamageThing();
Damages a thing.
Use: damage = DamageThing(thing,flex damage,flag,damage causething); returns amount of damage taken

For example:
[CODE]
Symbols
message damaged
thing AIkilled
flex damage=0 local
end

code
damaged:
damage = DamageThing(AIkilled, 2000, 0x2, GetSourceRef());
return;
end




------------------
Sylvicolus JK homepage (http://www.lactarius.com/sylvicolus/jk/)
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton

Descent_pilot
05-10-2002, 07:09 PM
DamageThing() damages a thing, it hurts the thing, it doesn't return a damage value. In the damaged: part, use Damage = GetParam(0) http://forums.massassi.net/html/wink.gif

------------------
The Sniper Missions. Current project, The X Project