RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[GM] winner

0 Members and 1 Guest are viewing this topic.

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
I have it set, for every enemy you kill, the variable win gets +1. I want it to say "you win" when you get 5 in win. To my small mind, it seems like what I have should work... but it doesn't.


Attached.
« Last Edit: March 04, 2014, 01:43:15 AM by modern algebra »
&&&&&&&&&&&&&&&&

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
I'm going to fix it, but I'm going to change a few things around if thats alright with you. Because at this point, it's too messy for me to do anything with it. I'll probably use GML coding for most of it, but I'll put detailed comments in it to help you understand.

Edit:
OK It's done. I changed alot on it, but it does the exact same thing. It's just way more organized now. I made it use less objects to get the job done. It no longer needs the wall object because I set the ship and enemy limit by room size and whatnot. The problem you were running into with the variable "win" is that you made each object (ship,enemy,winner) have their own variable called "win". This made it so that each could only add up to one, rather than having on variable that could possibly add up to five. An easy way around this is using global variables. I didn't use any in this example because they can get difficult to remember, and use up game memory. So I just gave the object "Winner" the variable "win" and all other objects that read the variable read it from object "Winner". Now all you have to do is make a graphic for "You Win" and put it in the object "Winner". If you need a better explanation of this, I'll be here.

Also I changed the health system. You no longer need multiple objects to display the hp. There is only one object and one hp variable. The object I made draws health for up to 5 health points if you want to use more. The new object is called "Hp_Drawer" and the hp for the ship is managed by it. So when referring/setting the hp for the ship use "Hp_Drawer.hp = #".

If you need help with any of the changes I've made, read the comments in the pieces of code or just ask me in this topic. Oh and here's a plus! The file size went down!
« Last Edit: November 04, 2007, 09:04:20 PM by J-Crew »

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
Thank you.
You helped me greatly, and I see what you did thar.  :D

Oh, and can you help me make them shoot randomly, and not all at once?  ???
&&&&&&&&&&&&&&&&

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
Sure! I'll look at it again when I get home tonight. But school is calling.

Edit:
Ok I made them fire at random intervals between 5 and 40 steps. You'll see in the step event of the baddy there is a comment that tells what to change if you want to make the random wait times slower. Also from a players point of view, I think you should move the ship down some to allow the player to have more time to dodge the enemy bullets. I think it's a bit too hard the way it is. But that's just my personal opinion. Ignore me if you think it's fine.
« Last Edit: November 05, 2007, 10:42:36 PM by J-Crew »

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
Also from a players point of view, I think you should move the ship down some to allow the player to have more time to dodge the enemy bullets. I think it's a bit too hard the way it is. But that's just my personal opinion. Ignore me if you think it's fine.

better?

(oh, and do you have AIM or MSN?) EDIT - >_> o, i c there, is says you have aim, I need to look first.
&&&&&&&&&&&&&&&&

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
It's much better! the larger screen size makes it a lot better. Oh yeah and there's one thing you may want to get rid of. In the object "gameover" I put a game restart thing by pressing F12. I only used it for tests but you may want to ged rid of that.

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
How would I make the ship level up?

Quote
if self.level = 1
self.hp = 2
if self.level = 2
self.hp = 2
if self.level = 3
self.hp = 3

Would it be something like this?
&&&&&&&&&&&&&&&&

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
First you'd have to define a variable called level for the object "Ship" and set to 1, because that's what you want the initial level to be I'd assume. Next, what I did was make a script called level up with the following code:
Code: [Select]
Ship.level = argument0

if Ship.level = 1
 {self.hp = 2}
if Ship.level = 2
 {self.hp = 3}
if Ship.level = 3
 {self.hp = 4}
if Ship.level = 4
 {self.hp = 5}

Now when you want the ship to level up, you call this script in the "Hp_Drawer" object and you set argument 0 to the desired ship level. The script will handle it from there.