Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Spawn entities on moving location & Using items on enemies
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#3
RE: Spawn entities on moving location & Using items on enemies

(11-01-2012, 10:29 PM)The chaser Wrote: Ok, here I go:

You can attach entities to a moving entity (I don't know if you can with the player).
In this case, you do this:

AddAttachedPropToProp("name of the entity", "name of the entity that it's going to be attached", "name of the entity that it's going to be attached.ent", 0,0,0, 0,0,0);

For the items on enemies, I did one thing in my story:

AddEntityCollideCallback("sledge_1", "Master", "Destroy", true, 1);

void Destroy (string &in asParent, string &in asChild, int alState)
{
AddTimer("", 1.0f, "Hits");
func_on1();
AddLocalVarInt("Kill", 1);
}

void Hits (string &in asTimer)
{
AddEntityCollideCallback("sledge_1", "Master", "Destroy", true, 1);
}

void func_on1()
{
if (GetLocalVarInt("Kill") == 3)
{
    FadeEnemyToSmoke("Master", true);
    AddTimer("", 6, "Credits");
    SetMessage("Messages", "WalkQuest_final", 5);
}
}
For the first one: the attach command doesn't stuck two items together???

For he second: what exactly is the "func_on1();" ???

[Image: 2H1Mc.jpg]
11-02-2012, 12:34 PM
Find


Messages In This Thread
RE: Spawn entities on moving location & Using items on enemies - by ZodiaC - 11-02-2012, 12:34 PM



Users browsing this thread: 1 Guest(s)