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 Puzzle Help
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#1
Puzzle Help

Hello , i wanna make an puzzle that gonna work like this

if you put a stone in a special place or any other entity you need to place two more entitys but they are on different locations

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-25-2012, 08:17 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#2
RE: Puzzle Help

i would suggest a simple collide callback. Can't tell more, since there's not enough information on how exactly you want it to look.
06-25-2012, 08:22 PM
Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#3
RE: Puzzle Help

(06-25-2012, 08:22 PM)FastHunteR Wrote: i would suggest a simple collide callback. Can't tell more, since there's not enough information on how exactly you want it to look.



A simple puzzle with 3 entitys and 3 plates = place 1 stone on plate 1 then you have 2 more to fix you understand more?

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-25-2012, 08:23 PM
Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#4
RE: Puzzle Help

Do you know how to script or do you want help? You can either do like FastHunter says, Collide callbacks, or you could use LocalVarInt variables

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
06-25-2012, 08:35 PM
Website Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#5
RE: Puzzle Help

1st one:
make a script area to where the stone should go.
Add a Collide callback for the stone touching the script area, the called function should set the stone inactive and should set a fixed, non-movable stone at the right place active.
Do the same with the rest.
Not too hard, ain't it? You can of course add sounds, special effects or something like that.
06-25-2012, 08:37 PM
Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#6
RE: Puzzle Help

void OnStart()
{
AddEntityCollideCallback("Stone1", "Stone1Area", "CollideStoneArea1", false, 0);
AddEntityCollideCallback("Stone2", "Stone2Area", "CollideStoneArea2", false, 0);
AddEntityCollideCallback("Stone3", "Stone3Area", "CollideStoneArea3", false, 0);

}

void CollideStoneArea1(string &in asParent, string &in asChild, int alState)
{
SetLocalVarInt("Stone1", 1);

//THIS CHECKS IF THE PUZZLE IS FINISHED
if(GetLocalVarInt("Stone1") == 1 && GetLocalVarInt("Stone2") == 1 && GetLocalVarInt("Stone3") ==1){
//FINISH THE PUZZLE, DO WHATEVER YOU WANT

}
}


void CollideStoneArea2(string &in asParent, string &in asChild, int alState)
{
SetLocalVarInt("Stone2", 1);

//THIS CHECKS IF THE PUZZLE IS FINISHED
if(GetLocalVarInt("Stone1") == 1 && GetLocalVarInt("Stone2") == 1 && GetLocalVarInt("Stone3") ==1){
//FINISH THE PUZZLE, DO WHATEVER YOU WANT

}
}


void CollideStoneArea3(string &in asParent, string &in asChild, int alState)
{
SetLocalVarInt("Stone3", 1);

//THIS CHECKS IF THE PUZZLE IS FINISHED
if(GetLocalVarInt("Stone1") == 1 && GetLocalVarInt("Stone2") == 1 && GetLocalVarInt("Stone3") ==1){
//FINISH THE PUZZLE, DO WHATEVER YOU WANT

}
}

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 06-25-2012, 08:44 PM by GoranGaming.)
06-25-2012, 08:43 PM
Website Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#7
RE: Puzzle Help

(06-25-2012, 08:35 PM)GoranGaming Wrote: Do you know how to script or do you want help? You can either do like FastHunter says, Collide callbacks, or you could use LocalVarInt variables



i dont know how to script with Var's :S

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-25-2012, 08:43 PM
Find
GoranGaming Offline
Member

Posts: 183
Threads: 30
Joined: Feb 2012
Reputation: 7
#8
RE: Puzzle Help

There you go, if you need more script help, contact me Smile

Note that this is jut a quick version of the puzzle, you need to add sound and other effects to make it look cool Smile

Current projects:

The Dark Prison 85 % (Stopped working on this one)

Unnamed Project 7 %
(This post was last modified: 06-25-2012, 09:03 PM by GoranGaming.)
06-25-2012, 08:44 PM
Website Find
SilentHideButFine Offline
Member

Posts: 156
Threads: 38
Joined: May 2012
Reputation: 6
#9
RE: Puzzle Help

(06-25-2012, 08:44 PM)GoranGaming Wrote: There you go, if you need more script help, contact me Smile



Note that this is jut a quick version of the puzzle, you need to add sound and other effects to make it look cool Smile



TY!!! Smile Going to try it out now!: )

[url= http://www.moddb.com/mods/jessehmusic [/url] ,HOSPITAL OF HORROR MOD
06-25-2012, 09:07 PM
Find




Users browsing this thread: 1 Guest(s)