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
Script Help Help With Script Functions Not Working
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#1
Help With Script Functions Not Working

Hi, I've been making a part of my map but i cannot pass it as some parts of the script are not working.

-------------------------------------
When You Place the Jar in the Area it Unsticks the wheel and then you can turn it. then there is a flash and oil filled the jar. then you pick it up. However when i place the jar, i can move the wheel but it doesn't do anything :/

void placeemptyjar(string &in asItem, string &in asEntity)
{
SetEntityActive("glass_container_static", true);
SetEntityInteractionDisabled("glass_container_static", true);
SetEntityConnectionStateChangeCallback("iron_crank_1", "openoil");
SetWheelInteractionDisablesStuck("iron_crank_1", true);
}

void openoil(string &in asEntity, int alState)
{
if (alState == 1)
{
StartEffectFlash(0.8f, 0.6f, 3.5f);
PlaySoundAtEntity("", "16_oil_drip.snt", "special_shrine_altar_1", 0.0f, false);
SetEntityActive("glass_container_static", false);
SetEntityActive("glass_container_oil", true);
return;
}
}

------------------------------
3: i'm unsure if this will work becuse i haven't been upto it because of scripts before it failing but. You Use Item On Pipe. It removes from inventory and adds local var int 1. and what i want to happen is a message saying' one more item to go' when there is 1 variable and 'thats all items' when there are 2 variables.

void sendoil(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("drop_oil", false);
AddLocalVarInt("items", 1);
func01();
}

void sendmeat(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("drop_meat", false);
AddLocalVarInt("items", 1);
func01();
}

void func01()
{
if(GetLocalVarInt("items") == 1)
{
PlaySoundAtEntity("", "george_test_1_half.snt", "Player", 0, true);
}

else

if(GetLocalVarInt("items") == 2)
{
PlaySoundAtEntity("", "george_test_1_complete.snt", "Player", 0, true);
AddTimer("oildrop", 9.0f, "spawnoil");
SetEntityInteractionDisabled("chest_lantern", true);
}
}
----------------------

This Darn House! , Four Doors, Youtube
(This post was last modified: 07-04-2012, 05:05 PM by heyitsrobert97.)
07-04-2012, 04:43 PM
Find


Messages In This Thread
Help With Script Functions Not Working - by heyitsrobert97 - 07-04-2012, 04:43 PM



Users browsing this thread: 1 Guest(s)