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
help script stuff sorta
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#11
RE: help script stuff sorta

(12-23-2013, 01:57 AM)Romulator Wrote: BEFORE trying the scripting suggestion below in the spoiler...

Your script has opening brackets instead of braces in the OnStart(), OnEnter() and OnLeave() routines. Anytime you make events occur within a routine, you'll need braces, and not brackets. Try this Smile
PHP Code: (Select All)
void OnStart()
{

}

void OnEnter()
{

}

void OnLeave()
{



Edit: OnLeave() is one word Smile

Spoiler below!
If you find this a nuisance, you could try purely scripting it...

PHP Code: (Select All)
OnStart()
{
SetEntityPlayerInteractCallback("""DoorLockedPlayer"true);
}

void DoorLockedPlayer(string &in entity)
{
if(
GetSwingDoorLocked("mansion_1") == true)
{
SetMessage("DoorLocked""doorlocked1"0);
}



Callback syntax god dang it.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 12-23-2013, 02:11 AM by PutraenusAlivius.)
12-23-2013, 02:10 AM
Find
MrJackrabbit Offline
Junior Member

Posts: 26
Threads: 10
Joined: Nov 2013
Reputation: 0
#12
RE: help script stuff sorta

alright so i finally got it to work yay Big Grin.

well if you guys would mind helping out any more could you provide a link or script for unlocking a swing door with the object?
12-23-2013, 02:59 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#13
RE: help script stuff sorta

Here ya go bro.
If you have any more problems, post it here.

"Veni, vidi, vici."
"I came, I saw, I conquered."
12-23-2013, 03:37 AM
Find
MrJackrabbit Offline
Junior Member

Posts: 26
Threads: 10
Joined: Nov 2013
Reputation: 0
#14
RE: help script stuff sorta

(12-23-2013, 03:37 AM)JustAnotherPlayer Wrote: Here ya go bro.
If you have any more problems, post it here.

thank ya very much brahh

well i have another problem.
i get the needle (which is the item i am using to unlock the door) and when i attempt to use it on a door it says "cannot be used this way".

if your willing to help:


void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "mansion_1", "FUNCTION", true);
}

blah blah blah
blah blah

onEnter blah

onLeave blah



void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
12-23-2013, 04:00 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#15
RE: help script stuff sorta

Did you put in the functions at CustomSubItemTypeName in the Level Editor? And did you make the properties in the .lang file?

EDIT:
If you use the item on the WRONG door, it won't work.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 12-23-2013, 04:15 AM by PutraenusAlivius.)
12-23-2013, 04:15 AM
Find
MrJackrabbit Offline
Junior Member

Posts: 26
Threads: 10
Joined: Nov 2013
Reputation: 0
#16
RE: help script stuff sorta

(12-23-2013, 04:15 AM)JustAnotherPlayer Wrote: Did you put in the functions at CustomSubItemTypeName in the Level Editor? And did you make the properties in the .lang file?

EDIT:
If you use the item on the WRONG door, it won't work.

Ive done the stuff in the .lang but idk what to do with the level editor
12-23-2013, 04:56 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#17
RE: help script stuff sorta

Just type anything. Or something.

"Veni, vidi, vici."
"I came, I saw, I conquered."
12-23-2013, 05:56 AM
Find




Users browsing this thread: 2 Guest(s)