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
What script do i need??
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#1
What script do i need??

what script do i need to
combine an Empty bucket with a acid container (with area into it.) ?!
i'm really doing everything but nothing is working ??! my script look like this

PHP Code: (Select All)
void OnStart()
{
SetEntityPlayerInteractCallback("note3""ShowSteve"false);
AddUseItemCallback("""Acidkey""Aciddoor""UsedKeyOnDoor"true);
AddUseItemCallback("""AcidBucket""Slijm""UseAcidOnWeb"true);
AddUseItemCallback("""Bucket""AcidArea""Puzzle"true);
PlayMusic("12_amb"true0.7f10false);
}

void ShowSteve(string &in asEntity)
{
SetEntityActive("Cellarsteve"true);
ShowEnemyPlayerPosition("Cellarsteve");


void UsedKeyOnDoor (string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("Aciddoor"falsetrue);
PlaySoundAtEntity("""unlock_door.snt""Aciddoor"0false);
RemoveItem("Acidkey");
}

void Bucket(string &in asItemstring &in asEntity)
{
SetEntityActive("AcidBucket"true);


void UseAcidOnWeb(string &in asItemstring &in asEntity)
{
SetPropHealth("Slijm"0);
RemoveItem("AcidBucket");
GiveItemFromFile("empty_container""chemical_container.ent");
GiveSanityBoost();
PlayMusic("02_puzzle"false10.1f10false);


i really don't know what to do... and yes bucket name is Bucket and acid area is AcidArea
08-20-2014, 02:35 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#2
RE: What script do i need??

First you need a useitemcallback thats going to call your function:

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("""AcidBucketName""ScriptArea""FunctionGetAcid"true);


Go to your level editor, and make sure that your script area you are going to use bucket on has a useitem ticked on (if you dont know where it is, take a look at atachment i added to this post).

Now, since we already have useitemcallback we need a function
Place filled acid bucket in front of your barrel, and tick it off (set it non active, below the name of the bucket) and call the filled acid bucket "BucketAcid"


PHP Code: (Select All)
void FunctionGetAcid(string &in asItemstring &in asEntity)
{
    
SetEntityActive("BucketAcid",true);
    
RemoveItem("AcidBucketName"); // thats the bucket from your inventory
    
PlaySoundAtEntity("""16_fill_oil.snt""Player"1.0ftrue);



The function baiscally sets the bucket acid we put later on, so you can pick it up. Use "BucketAcid" item later for your acid puzzle purposes (removing slime etc) I also added a func that removed the empty container, and a sound of filling bucket.
08-20-2014, 02:58 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#3
RE: What script do i need??

omgg thankss!!!
i just didn't use the Functioname... thankyou really much!!
finally!!
but i have 1 question..

i want to make a parkoer... where steve(grunt) or that skull thing
follows you... but to make a parkour you can go through everything but steve just stay behind... like you have to jump through barrels... (static) and steve can't jump.. and he is there an don't do anything... is there an flying enemy or a thing to fix this ?! i want to make a run thing
and is there a place where you can download Grunt without sound ?! one time i found but i forgot where... Sad
08-20-2014, 03:11 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#4
RE: What script do i need??

(08-20-2014, 03:11 PM)Amnesiaplayer Wrote: omgg thankss!!!
i just didn't use the Functioname... thankyou really much!!
finally!!
but i have 1 question..

i want to make a parkoer... where steve(grunt) or that skull thing
follows you... but to make a parkour you can go through everything but steve just stay behind... like you have to jump through barrels... (static) and steve can't jump.. and he is there an don't do anything... is there an flying enemy or a thing to fix this ?! i want to make a run thing
and is there a place where you can download Grunt without sound ?! one time i found but i forgot where... Sad

Unfortunately, I have to smash up your dreams about parkour Grunt* (we don't like calling him "Steve" here), there is no way to do it unless you are pretty advanced at scripting and know some tricks around here.

I added grunt without music as attachment, hoping that is what you wanted
08-20-2014, 03:24 PM
Find
Amnesiaplayer Offline
Senior Member

Posts: 539
Threads: 105
Joined: Jun 2014
Reputation: 0
#5
RE: What script do i need??

thanks Big Grin
and okay i will call him grunt Big Grin
and if it doesn't work i will just do the run part... but what i hate is that steve is Slow.. and if you run long (with corners) he will lose you and if there are statues he will get stuck Sad but thanks
08-20-2014, 03:29 PM
Find




Users browsing this thread: 1 Guest(s)