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
The "IF" with HasItem
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#11
RE: The "IF" with HasItem

(04-09-2012, 06:21 AM)Quotentote Wrote: i would make it a bit easier. i guess you want agrippa to spawn as soon as the player enters that area right? i would make the area inactive and activate it when you picked up that key..
less pro but easier xD
how do i make areaConfused active etc

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-09-2012, 01:12 PM
Website Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#12
RE: The "IF" with HasItem

(04-09-2012, 01:11 PM)SilentStriker Wrote:
(04-09-2012, 10:49 AM)Datguy5 Wrote: When this is done can someone help me with my if function?I dont wanna start a new thread about it.Im trying that if player doesnt have item,the player will look at it.
try
if(HasItem("nameofitem") == false){
//Event here
}
Ive never used the if function before.Can you be more specific with that?Also the item is combinable in the game.What if the player has combined it before he collides with the area?


04-09-2012, 06:17 PM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#13
RE: The "IF" with HasItem

(04-09-2012, 09:57 AM)SilentStriker Wrote: I remember a script that always messed up, it didn't trigger but then I realised that I went throught the area and the trigger was removed so I changed so the callback would be removed on trigger x)

void Scary1(string &in asParent, string &in asChild, int alState)
if(HasItem("The_gone_key") == false)
{
SetEntityActive("agrippa_headless_1", true);
PlaySoundAtEntity("", "alois_amb_idle.snt", "Player", 0, false);
}

"get error : expected ; or :"

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-09-2012, 08:39 PM
Website Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#14
RE: The "IF" with HasItem

void Scary1(string &in asParent, string &in asChild, int alState)
{
if(HasItem("The_gone_key"))
{
SetEntityACtive("agrippa_headless_1", true);
PlaySoundAtEntity("", "alois_amb_idle.snt", "Player", 0, false);
}
}

04-09-2012, 09:16 PM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#15
RE: The "IF" with HasItem

(04-09-2012, 09:16 PM)Obliviator27 Wrote: void Scary1(string &in asParent, string &in asChild, int alState)
{
if(HasItem("The_gone_key"))
{
SetEntityACtive("agrippa_headless_1", true);
PlaySoundAtEntity("", "alois_amb_idle.snt", "Player", 0, false);
}
}
He dosn't Spawn at all now :S

damn this realy make me pissed

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-09-2012, 09:34 PM
Website Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#16
RE: The "IF" with HasItem

SetEntityActive, sorry, I didn't release the shift key in time.

04-09-2012, 10:22 PM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#17
RE: The "IF" with HasItem

(04-09-2012, 10:22 PM)Obliviator27 Wrote: SetEntityActive, sorry, I didn't release the shift key in time.
i saw that and changed it but it still dosnt work :S

the script wont call :S

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-10-2012, 11:32 AM
Website Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#18
RE: The "IF" with HasItem

Start using debug messages it helps alot.

04-10-2012, 12:40 PM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#19
RE: The "IF" with HasItem

(04-10-2012, 12:40 PM)SilentStriker Wrote: Start using debug messages it helps alot.
i have it Smile

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-10-2012, 12:45 PM
Website Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#20
RE: The "IF" with HasItem

Can you upload your map with script file?
04-10-2012, 01:12 PM
Find




Users browsing this thread: 5 Guest(s)