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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help with creating more than 1 scripts for my custom story
ironman0001 Offline
Member

Posts: 53
Threads: 8
Joined: Sep 2012
Reputation: 0
#1
I need help with creating more than 1 scripts for my custom story

I am new to scripting and this is my first custom story! i know each script needs a void but i don't know what void to add! besides void onstart and onenter and onleave But i wanna create a bunch of scripts and iv'e seen scripts that had more than just those! Here is my script so far void OnStart()
{
AddEntityCollideCallback("Player", "TeleportScript", "PoopedYaPants", true, 1);
}

void PoopedYaPants(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus", true);
AddPropForce("Jesus", 0, 0, 10000, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "Jesus", 0, false);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);
}


void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Popup1", 0); //This stands for ("Name of category", "Name of entry", time to be displayed on the screen);.
}

I want a message to pop up as soon as you spawn! Then when you go down stairs, A dead guy teleports and flies in your face! Big Grin Can i replace void OnEnter with anything?
09-27-2012, 11:32 PM
Find


Messages In This Thread
I need help with creating more than 1 scripts for my custom story - by ironman0001 - 09-27-2012, 11:32 PM



Users browsing this thread: 5 Guest(s)