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
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Spawn entities on moving location & Using items on enemies

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);
}
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-01-2012, 10:29 PM
Find


Messages In This Thread
RE: Spawn entities on moving location & Using items on enemies - by The chaser - 11-01-2012, 10:29 PM



Users browsing this thread: 2 Guest(s)