Page 3 of 4

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 15th, 2010, 7:35 pm
by Zunar
Ty! :D And how do you make it where if you're standing next to something and you press a button to swing your weapon that the object you're standing next to be destroyed?

Example: Pot.
Stand right next to it and swing your sword. It will break.

How do you make it that way?

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 16th, 2010, 6:38 pm
by agentms11
hhhmmm...
The easiest way I can think of is to make a separate object for the sword Link.
When you hit a button you are transformed to that object.
In the collision event for that object with the pot, the pot gets destroyed.
Of course, don't forget to transform the object back after the swing.
I think that would be the easiest way.
Hope this helps!!!!!

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 16th, 2010, 7:09 pm
by Zunar
But I want Link to be visible when he swings his sword....

I think I could fiddle around with the action "Check Object" in Control. Ty, though!

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 16th, 2010, 7:37 pm
by agentms11
It could be visible.
Make that when u hit the button change instance to obj_sword_link.
Make obj_sword_link have the sprite if the animation of link swinging the sword.
In the event "Animation End", change instance back to regular obj_link.

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 16th, 2010, 7:39 pm
by Zunar
Ty. Also, how do you make it where a message will appear and it will have different options on it and it does different things depending on which option you select?

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 16th, 2010, 7:50 pm
by agentms11
I sent this in a PM to you, but it might be helpful for other people, so I will post it here.

Code: Select all
message = show_message_ext( "What do you want to say?" , "Hi" , "Hello" , "Bye");
if message = 1
{
Do something;
}
else if message = 2
{
Do another something;
}
else if message = 3
{
Do something different;
}


EXPLANATION!!!

message = show message_ext( "What do you want to say?" , "Hi" , "Hello" , "Bye")

"message" is the variable. "show_message_ext" is the function.
""What do you want to say?"" is what the message box will show (the question).
""Hi"" is what the first button will say. ""Hello"" is what the second button will say. ""Bye"" is what the third button will say.
---
if message = 1
{
Do something;
}

If the variable "message" is equal to one (i.e. you chose the first button), then do something.
---
if message = 2
{
Do another something;
}

If the variable "message" is equal to two (i.e. you chose the second button), then do another something.
---
if message = 3
{
Do something different;
}

If the variable "message" is equal to three (i.e. you chose the first button), then do something different.
---

Oh, change the "Do something" with what you want to happen if the player hits that button.
Hope this helps!!!!

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 21st, 2010, 11:27 am
by agentms11
Any other questions???
I like helping.

Re: Zunar's Games *INFO NEEDED*

PostPosted: February 21st, 2010, 3:08 pm
by Zunar
Nope. TY! :D

EDIT: Yes, actually. I put that stuff in, but it says "ERROR at line 2 pos. 6: Symbol, or ) expected." What do I do?

Re: Zunar's Games

PostPosted: February 21st, 2010, 5:56 pm
by agentms11
Show me the code.
Post it here.

Re: Zunar's Games

PostPosted: February 25th, 2010, 5:55 pm
by Zunar
Sry. It's the same code you have up on one of the previous posts.