Click and Point-Adventure Game Helps

Non-platform specific questions.

Click and Point-Adventure Game Helps

Postby XclusiveGames » Mon Jun 27, 2011 3:36 am

Click and Point-Adventure Game
1.Can some say me how to move the frame(view) to another frame when a button or an area is clicked :)
Masscreations.
XGames

Under Development
User avatar
XclusiveGames
 
Posts: 35
Joined: Fri Jan 21, 2011 3:30 pm
Score: 4 Give a positive score

Re: Click and Point-Adventure Game Helps

Postby skydereign » Mon Jun 27, 2011 5:38 am

Well do you want it to be smooth or jump there? If you want it to just jump, have a filled region stretched over the view (same size), set its zdepth to 0, and add this code.
filled -> Mouse Button Down (left) -> Script Editor
Code: Select all
view.x=xmouse-width/2;
view.y=ymouse-height/2;


You could parent that actor to the view, but due to zdepth issues, I'd either use creator, or something like this.
filled -> Draw Actor -> Script Editor
Code: Select all
x=view.x;
y=view.y;


If you want it to be smooth movement, you should have this as your mouse button down event.
filled -> Mouse Button Down (left) -> Script Editor
Code: Select all
MoveTo("view", -width/2, -height/2, 10, "Mouse Position", "(none)");


Just to note since the view's and filled actor's width and height are the same you don't need to specify view.width or view.height.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest