Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'Slime puzzle'
Author Message
Quotentote Offline
Member

Posts: 118
Joined: Dec 2011
Reputation: 11
Post: #1
'Slime puzzle'

hi i need help again...

i want a pot of acid to destroy this organic slime stuff.

i was just trying around and tried:

AddEntityCollideCallback("pot1", "slimeaway", "slime", true, 1);

void slime(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("slime1", false);
}

do i have to combine something or is this kind of script not the right one?

ty for answers
quotentote
(This post was last modified: 12-18-2011 09:51 PM by Quotentote.)
12-18-2011 02:37 PM
Find all posts by this user Quote this message in a reply
Dobbydoo Offline
Member

Posts: 50
Joined: Aug 2011
Reputation: 0
Post: #2
RE: 'Slime puzzle'

I guess you would want to do something like this.

PHP Code: (Select All)
AddUseItemCallback(stringasNamestringasItemstringasEntitystringasFunctionbool abAutoDestroy);

void MyFunc(string &in asItemstring &in asEntity)
{
SetPropActiveAndFade(stringasNamebool abActivefloat afFadeTime);


12-18-2011 03:07 PM
Find all posts by this user Quote this message in a reply
Quotentote Offline
Member

Posts: 118
Joined: Dec 2011
Reputation: 11
Post: #3
RE: 'Slime puzzle'

PHP Code: (Select All)
AddUseItemCallback("""pot1""slime1""slime"bool abAutoDestroy);

void slime(string &in asItemstring &in asEntity)
{
SetPropActiveAndFade("slime1"bool abActivefloat afFadeTime);



so i dont need an area for that?

as i try to start the map i got an error...blabla 'expected '(''
sorry for my questions :/ just new in scripting
12-18-2011 03:22 PM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,285
Joined: Apr 2011
Reputation: 57
Post: #4
RE: 'Slime puzzle'

(12-18-2011 03:22 PM)Quotentote Wrote:  
PHP Code: (Select All)
AddUseItemCallback("""pot1""slime1""slime"bool abAutoDestroy);

void slime(string &in asItemstring &in asEntity)
{
SetPropActiveAndFade("slime1"bool abActivefloat afFadeTime);



so i dont need an area for that?

as i try to start the map i got an error...blabla 'expected '(''
sorry for my questions :/ just new in scripting
Your using a item with a Entity, that's not a area.

void OnStart()
{
AddUseItemCallback("", "nameofpotion", "nameofentityyourusingthepotionon, "slime, false);
}

void slime(string &in asItem, string &in asEntity)
{
SetEntityActive("nameofslime", false);
OR
SetPropActiveAndFade("nameofslime, true, 1.0f);
}

(This post was last modified: 12-18-2011 03:32 PM by flamez3.)
12-18-2011 03:31 PM
Find all posts by this user Quote this message in a reply
Dobbydoo Offline
Member

Posts: 50
Joined: Aug 2011
Reputation: 0
Post: #5
RE: 'Slime puzzle'

If you want to make it more fancy you could also add some particle effects, and you should add sounds no matter what. If you want to take it to the extreme you could also make an animation with the acid being poured onto the slime.
(This post was last modified: 12-18-2011 03:54 PM by Dobbydoo.)
12-18-2011 03:53 PM
Find all posts by this user Quote this message in a reply
Quotentote Offline
Member

Posts: 118
Joined: Dec 2011
Reputation: 11
Post: #6
RE: 'Slime puzzle'

it almost works!
i took your
SetPropActiveAndFade("nameofslime", true, 1.0f);

but it faded 'backwards'...it despawns first and then it appears with that fading effect xD

(12-18-2011 03:53 PM)Dobbydoo Wrote:  If you want to make it more fancy you could also add some particle effects, and you should add sounds no matter what. If you want to take it to the extreme you could also make an animation with the acid being poured onto the slime.

ofc i will add a sound but first it has to work ^^ and particles...as i said im REALLY new in scripting/mapping... its the first time i do something like that. i also got some problems with a sound... i created an area where the player is forced to look at...sound works great but i can hear it around the hole map sometimes xD
(This post was last modified: 12-18-2011 04:05 PM by Quotentote.)
12-18-2011 04:00 PM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,285
Joined: Apr 2011
Reputation: 57
Post: #7
RE: 'Slime puzzle'

(12-18-2011 04:00 PM)Quotentote Wrote:  it almost works!
i took your
SetPropActiveAndFade("nameofslime", true, 1.0f);

but it faded 'backwards'...it despawns first and then it appears with that fading effect xD

(12-18-2011 03:53 PM)Dobbydoo Wrote:  If you want to make it more fancy you could also add some particle effects, and you should add sounds no matter what. If you want to take it to the extreme you could also make an animation with the acid being poured onto the slime.

ofc i will add a sound but first it has to work ^^ and particles...as i said im REALLY new in scripting/mapping... its the first time i do something like that. i also got some problems with a sound... i created an area where the player is forced to look at...sound works great but i can hear it around the hole map sometimes xD
I'm not sure if it will work , but change the true to false. Also with the sound not being able to be heard across the map. Click on the sound in the level editor and change the max distance. That will change the distance it can be heard.

(This post was last modified: 12-18-2011 04:42 PM by flamez3.)
12-18-2011 04:41 PM
Find all posts by this user Quote this message in a reply
Quotentote Offline
Member

Posts: 118
Joined: Dec 2011
Reputation: 11
Post: #8
RE: 'Slime puzzle'

hooray it works Smile ty very much Smile
and the sound... its not an sound-zone i created in an area its a sound from my script file. i can hear it on random places in my map... like a loop or something

PHP Code: (Select All)
void looking(string &in asParentstring &in asChildint alState)
{
   
    
StartPlayerLookAt("lookto"1050"");
    
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
    
PlaySoundAtEntity("""react_scare.snt""Player"0false);
    
PlaySoundAtEntity("""15_the_big_scream.snt""Player"0false);
    
GiveSanityDamage(5.0ftrue);
    
AddTimer(""2"TimerStopPlayerLook");
}

void TimerStopPlayerLook (string &in asTimer)
{
    
StopPlayerLookAt();

12-18-2011 05:47 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)