Zunar's Games

Need programming help? Want to post programming tips? Are you programming a game and want to show it off? That and more here.

Re: Zunar's Games *INFO NEEDED*

Postby Zunar » February 15th, 2010, 7:35 pm

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?
User avatar
Zunar
Honorary Member

 
Posts: 1838
Joined: August 1st, 2009, 4:50 pm
Location: In the shadows, where you'll never find me.

Thumbs Up given: 14 times
Thumbs Up received: 51 times

Re: Zunar's Games *INFO NEEDED*

Postby agentms11 » February 16th, 2010, 6:38 pm

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!!!!!
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Re: Zunar's Games *INFO NEEDED*

Postby Zunar » February 16th, 2010, 7:09 pm

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!
User avatar
Zunar
Honorary Member

 
Posts: 1838
Joined: August 1st, 2009, 4:50 pm
Location: In the shadows, where you'll never find me.

Thumbs Up given: 14 times
Thumbs Up received: 51 times

Re: Zunar's Games *INFO NEEDED*

Postby agentms11 » February 16th, 2010, 7:37 pm

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.
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Re: Zunar's Games *INFO NEEDED*

Postby Zunar » February 16th, 2010, 7:39 pm

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?
User avatar
Zunar
Honorary Member

 
Posts: 1838
Joined: August 1st, 2009, 4:50 pm
Location: In the shadows, where you'll never find me.

Thumbs Up given: 14 times
Thumbs Up received: 51 times

Re: Zunar's Games *INFO NEEDED*

Postby agentms11 » February 16th, 2010, 7:50 pm

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!!!!
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Re: Zunar's Games *INFO NEEDED*

Postby agentms11 » February 21st, 2010, 11:27 am

Any other questions???
I like helping.
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Re: Zunar's Games *INFO NEEDED*

Postby Zunar » February 21st, 2010, 3:08 pm

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?
User avatar
Zunar
Honorary Member

 
Posts: 1838
Joined: August 1st, 2009, 4:50 pm
Location: In the shadows, where you'll never find me.

Thumbs Up given: 14 times
Thumbs Up received: 51 times

Re: Zunar's Games

Postby agentms11 » February 21st, 2010, 5:56 pm

Show me the code.
Post it here.
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Re: Zunar's Games

Postby Zunar » February 25th, 2010, 5:55 pm

Sry. It's the same code you have up on one of the previous posts.
User avatar
Zunar
Honorary Member

 
Posts: 1838
Joined: August 1st, 2009, 4:50 pm
Location: In the shadows, where you'll never find me.

Thumbs Up given: 14 times
Thumbs Up received: 51 times

PreviousNext

Return to Programming