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
Spawning entity by pressing a key?
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#5
RE: Spawning entity by pressing a key?

Aaaaw, this is an old-school script! Here:

void OnStart() //Or you can put the following stuff in OnEnter()
{
SetEntityCallbackFunc("YOUR_KEY", "OnPickup");
}

void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("YOURENTITY", true);
}

/////OR YOU CAN USE

void OnPickup(string &in asEntity, string &in type)
{
CreateEntityAtArea("Your_entity_name", "ENTITY.ENT", "AREATOBESPAWNEDATNAME", false);
}

EDIT: Oh my god, I misread your post... spawning an entity pressing a keyboard key... nope, nothing that I know of.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 01-23-2014, 06:52 PM by The chaser.)
01-23-2014, 06:50 PM
Find


Messages In This Thread
RE: Spawning entity by pressing a key? - by The chaser - 01-23-2014, 06:50 PM



Users browsing this thread: 1 Guest(s)