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
How do I transform an object into a monster?
Dragoon Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2012
Reputation: 0
#1
How do I transform an object into a monster?

I am currently creating a map where the player needs to pick up an object. What I wish to do is make the player pass through a Script area, and then the object the player is currently holding becomes a monster right in front of him/her. I know some basic scripting, but not very advanced. How would I be able to do this, if I can?

(The item is NOT in the inventory, but rather, a held item.) Thanks in advance!
(This post was last modified: 06-28-2012, 03:03 AM by Dragoon.)
06-27-2012, 08:32 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: How do I transform an object into a monster?

Make it so it is not the player that collides with the script area, but rather the item.
Place a squared script area in the middle of the corridor. (I guess it is a corridor)
Then put some diagonal block boxes so the item, is forced to hit the script area.

so the script:

void OnStart()
{

AddEntityCollideCallback("ITEM", "ScriptArea_1", "OnItemCollide_1", true, 1);
}

void OnItemCollide_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
SetEntityActive("ITEM", false);

}

Trying is the first step to success.
06-27-2012, 09:20 PM
Find
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#3
RE: How do I transform an object into a monster?

Beecakes solution looks great. That should work. You can always add additional effects like shake the screen or playing a sound to make it more intense or scarier.
06-27-2012, 10:39 PM
Find
Dragoon Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2012
Reputation: 0
#4
RE: How do I transform an object into a monster?

Thanks for the help guys! It worked perfectly! I really appreciate this help. :}
06-28-2012, 03:02 AM
Find




Users browsing this thread: 1 Guest(s)