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??
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


Messages In This Thread
What script do i need?? - by Amnesiaplayer - 08-20-2014, 02:35 PM
RE: What script do i need?? - by Slanderous - 08-20-2014, 02:58 PM
RE: What script do i need?? - by Amnesiaplayer - 08-20-2014, 03:11 PM
RE: What script do i need?? - by Slanderous - 08-20-2014, 03:24 PM
RE: What script do i need?? - by Amnesiaplayer - 08-20-2014, 03:29 PM



Users browsing this thread: 1 Guest(s)