The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help with scripting! SCRIPT INSIDE
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#1
I need help with scripting! SCRIPT INSIDE

Hello, ive been working hours for this to work, and well im no awesome programmer. Here's what i want to do?

I want player to walk to a script area, named "ScriptArea_1". when the player walk in the area, i wanted a monster to spawn behind player, and make the camera on the monster for 1.5 seconds. the monster i wish to be behind him is "servant_grunt_2" (02 for being another one in the level) i have no idea how to do this, i have looked on google and youtube and all the tutorials for triggering are on making doors shut behind people and not the things i want, now i hope anyone could help me with this delima, i have worked on it for hours with no possible solution in the near future, i would really appreciate any help i can get.

Thanks
Please People! I need help!


I ADDED MORE STUFF IN, THIS IS THE WHOLE SCRIPT

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_2" , true);
}
AddUseItemCallback("""R01_Key1", "cabinet_metal_1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet_metal_1", false, true);
}

im making the cabnit closed and locked. im making it open with a key on a table(odley enough) and it doesnt seem to be working, this keeps stuffing up : AddUseItemCallback("""R01_Key1", "cabinet_metal_1", "KeyOnDoor", true); JUST AFTER THE ADDUSEITEMCALLBACK thing it says theres a expected identifier, but i don't know to put one in.
(This post was last modified: 04-22-2011, 12:17 PM by flamez3.)
04-22-2011, 10:28 AM
Find


Messages In This Thread
I need help with scripting! SCRIPT INSIDE - by flamez3 - 04-22-2011, 10:28 AM
RE: I need help with scripting! - by Dalroc - 04-22-2011, 11:05 AM
RE: I need help with scripting! - by flamez3 - 04-22-2011, 11:11 AM



Users browsing this thread: 1 Guest(s)