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
using a lever on the mount.
stokesie95 Offline
Member

Posts: 87
Threads: 29
Joined: Nov 2011
Reputation: 4
#1
using a lever on the mount.

im trying to use the handle from the lever and then use it on the mount to make it complete. but i cant seem to get it to work. the names are matching and i am using both "AddUseItemCallback" and "AddEntityCollideCallback". niether are working and i have tried using a script area to interact with and still nothing

any suggestions?[/align]

Looking for scripting work
01-19-2013, 08:57 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: using a lever on the mount.

It's really easy:

Put the lever without mount anywhere in your map and just the mount where you need it. Make a script area that fits the mount. Then;

void OnStart()
{
AddEntityCollideCallback("Lever_without_mount", "Script_area_mount", "Mount", true, 1);
}

void Mount (string &in asParent, string &in asChild ,int alState)
{
SetEntityActive("Lever_mounted", true); //This entity is the normal lever
SetEntityActive("Lever_mount", false); //Mount of the lever
SetEntityActive("Lever_without_mount", false);
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 01-19-2013, 10:03 PM by The chaser.)
01-19-2013, 10:02 PM
Find
stokesie95 Offline
Member

Posts: 87
Threads: 29
Joined: Nov 2011
Reputation: 4
#3
RE: using a lever on the mount.

(01-19-2013, 10:02 PM)The chaser Wrote: It's really easy:

Put the lever without mount anywhere in your map and just the mount where you need it. Make a script area that fits the mount. Then;

void OnStart()
{
AddEntityCollideCallback("Lever_without_mount", "Script_area_mount", "Mount", true, 1);
}

void Mount (string &in asParent, string &in asChild ,int alState)
{
SetEntityActive("Lever_mounted", true); //This entity is the normal lever
SetEntityActive("Lever_mount", false); //Mount of the lever
SetEntityActive("Lever_without_mount", false);
}
sorry, found the problem before checking back here. thanks though

Looking for scripting work
01-19-2013, 10:27 PM
Find




Users browsing this thread: 1 Guest(s)