Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Creating a Puzzle

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Master K
Ex-Akatsuki Masked Ninja




Joined: 11 Jun 2011
Posts: 57
Location: Everywhere and Nowhere. Muahaha!

PostPosted: Sat Jun 11, 2011 11:13 am    Post subject: Creating a Puzzle Reply with quote

Hello dear reader.

I would like to know how I could create a puzzle with plotscripting. I have a basic idea of it forming in my head on what might be needed:

*NPC's that look like puzzle pieces.
*A tileset that looks like a completed puzzle.
*Perhaps a cursor script to move said puzzle pieces?

Could you please help me?
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Jun 12, 2011 1:42 am    Post subject: Reply with quote

Wow that's vague! Are you thinking of the fifteen puzzle, or what? Maybe you're asking for puzzle ideas rather than actual scripting help?
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Master K
Ex-Akatsuki Masked Ninja




Joined: 11 Jun 2011
Posts: 57
Location: Everywhere and Nowhere. Muahaha!

PostPosted: Sun Jun 12, 2011 5:51 am    Post subject: Reply with quote

Apologies for vagueness, what I mean is actual (I rather that over fake) scripting help to make a sort of jigsaw puzzle.

What I am really curious to know is how to make something trigger by pushing something else on it in the right position.
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Jun 12, 2011 6:02 pm    Post subject: Reply with quote

Ah. Pretty simple. It'd be best to run a loop in the map autorun script which continually checks npc positions. Also it's best to use pixel positions instead of tile positions so that effects don't immediately occur when an NPC starts to move onto the correct tile. I'm going to assume that all the pushable npcs are unique (they each have a different NPC definition number). Here's a script to set a tag when a specific npc is in a specific spot:

Code:

plotscript, puzzle map, begin
  while (current map == 1) begin  # set the correct map number here
    if (npc pixel x (1) == 4 * 20 && npc pixel y (1) == 5 * 20)  # change to correct position
    then (set tag (tag:npc 1 placed, on))  #change tag name
    else (set tag (tag:npc 1 placed, off))

    #more npc position checks can go here...

    wait
  end
end

Depending on whether the map resets when you leave the map and come back, you might want to add "set tag (tag:npc 1 placed, off)" to the end of the script. But if this is a one-time minigame, probably not.

If you want something to happen when multiple npcs are correctly placed, you'd want to count them instead of setting tags.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group