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
'Slime puzzle'
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#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
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#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
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#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
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#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
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#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
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#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
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#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
Quotentote Offline
Member

Posts: 118
Threads: 23
Joined: Dec 2011
Reputation: 11
#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




Users browsing this thread: 1 Guest(s)