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 Some questions
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#3
RE: Some questions

(04-02-2012, 12:49 PM)heyitsrobert97 Wrote: For The Acid Part go

void OnStart()
{
AddUseItemCallback("", "jar", "acidcontainer", "pickacid", true);}

void pickacid(string &in asItem, string &in asEntity)
{
RemoveItem("jar");
GiveItem("", "glass_container_mix_done", "", "glass_container_mix_done
.tga", 1.0f);
PlaySoundAtEntity("", "puzzle_acid_success.snt", "Player", 0, false);
}

and for music to stop it should be like this

StopMusic(0.5f, 0);

Remember that when it says float like in stop music you put it in decimal with f at the end
like 0.0f-10.0f
The give item might work but i have not used that command before.but then you have to create
another UseItemCallback for the thing you want to use the acid on. for example

{
AddUseItemCallback("", "acidjar", "acidobject", "dissolveacid", true);
}

void dissolvedacid(string &in asItem, string &in asEntity)
{
SetPropActiveAndFade("acidobject", false, 2.0f);
PlaySoundAtEntity("", "puzzle_acid.snt", "Player", 0, false);
RemoveItem("acidjar")
PlaySoundAtEntity("", "quest_completed.snt", "Player", 0, false);
AddPlayerHealth(10.0f);
}

That Should Work Fine. Don't Worry I was like you. didn't know how to script or anything
(that was 3weeks ago) and now i'm used to it.


for the first acid thing it said fatal error multiline strings are not allowed in this application? 18,46

AddUseItemCallback("", "chemical_container_1", "acid_container_1", "pickacid", true);


void pickacid(string &in asItem, string &in asEntity)
{
RemoveItem("chemical_container_1");
GiveItem("", "glass_container_mix_done", "", "glass_container_mix_done <------- something wrong in here runs fine without it just without i dont get anything but the beggining script worked it took my jar just didnt give anything back
.tga", 1.0f);
PlaySoundAtEntity("", "puzzle_acid_success.snt", "Player", 0, false);
}
oh but the music stopped perfectly Smile
(This post was last modified: 04-02-2012, 02:21 PM by zombiehacker595.)
04-02-2012, 02:13 PM
Find


Messages In This Thread
Some questions - by zombiehacker595 - 04-02-2012, 11:19 AM
RE: Some questions - by heyitsrobert97 - 04-02-2012, 12:49 PM
RE: Some questions - by zombiehacker595 - 04-02-2012, 02:13 PM
RE: Some questions - by Strembitsky - 04-02-2012, 02:35 PM
RE: Some questions - by zombiehacker595 - 04-02-2012, 02:39 PM



Users browsing this thread: 1 Guest(s)