The Daily Click ::. Forums ::. Klik Coding Help ::. Zelda II - Bot
 

Post Reply  Post Oekaki 
 

Posted By Message

vSv



Registered
  06/04/2010
Points
  373
13th November, 2010 at 14:11:08 -

Hello!

I have been trying to get the enemy "Bot" to work properly for a while now, but I just can't make it jump around like in the original Zelda II. What am I doing wrong?

http://www.easy-share.com/1912955825/Enemy Zelda II Bot.mfa

There is also a problem when adding multiple enemies of this type, I dunno why but if anyone could help me out here I would be very grateful.

 
- vSv

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
13th November, 2010 at 15:00:50 -

Can you please explain exactly what you are trying to do?

I can't download because I'm not on a computer with MMF2 atm.

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
13th November, 2010 at 15:20:57 -

I can't help that much because I can't download extensions right now and don't have platform.mfx, but it would seem that your multiple enemies problem could be solved by giving the enemy an alterable value ID and spreading <(# of bots) - 1> in their id value. Then when you want only one thing do do something you can put in an "if ID of bot = X". As for jumping around, I may be able to help more if you posted a video or screenshot.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

vSv



Registered
  06/04/2010
Points
  373
13th November, 2010 at 16:08:05 -

If you have ever played the game "Zelda II" on the NES, chances are that you might have encountered an enemy named "Bot". They are gelatinous blue-purple masses that can be found throughout Hyrule.
http://zelda.wikia.com/wiki/Bot


There are also the "Bit" which is more or less the enemy I have created so far, they are the one that does not jump, they just walk around.
http://zelda.wikia.com/wiki/Bit


I need help to make my "Bit" become a "Bot", that is, to make it able to jump around. There is also a problem when I try to add several Bots on the same screen, they start moving faster and seems to walk into each others more frequently.

Here is a link to a video I made that shows how the Bot and Bit move ingame: http://www.easy-share.com/1912956829/Zelda II - Bot.mp4


 
- vSv

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
13th November, 2010 at 16:25:09 -

Well the PMO can only really handle one object. There is a way to make it work but its confused the crap out of me. I cant find the file that im talking about though. It was posted by nifflas on the clickteam forums though im pretty sure.

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
13th November, 2010 at 17:33:36 -

Ok I have it coded, I'll post it on mediafire or dropbox or something...

EDIT: Here you go.
http://www.mediafire.com/?fr8iudwjhk4qitj

Edited by monkeytherat

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

vSv



Registered
  06/04/2010
Points
  373
13th November, 2010 at 19:58:51 -

The thing is, I want it to work with more or less an unlimited ammount of Bot's at the same time so I don't have to script "Bot 1", "Bot 2", "Bot 3" and so on as that will be pretty tedious work when making new enemies that should be able to work together without having to make a new script for every new enemy of the same type, if this is even possible at all that is. I'm thinking of the "Bot Pillar" (http://zelda.wikia.com/wiki/Bot_Pillar) from Zelda II that drops small slimes that instantly turns into Bots upon landning, for that to work I have to make every Bot unique by themselves somehow.

I'll try the Value ID and spreading thing when I'm home again, but I dunno if that jump where the jump aint a jump but an animation will work in stages with obstacles such as blocks that they should be able to jump over or/and on, but I have to try it anyway! Thanks Monkeytherat!

 
- vSv

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
13th November, 2010 at 20:14:39 -

You're welcome, and I'll see what I can do about infinite Bots.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
13th November, 2010 at 22:58:49 -

I made this in like 60 seconds so the code is far from efficient.

Left click to add an enemy. Hold Right click to add a LOT. Shift to make them jump.

http://www.mediafire.com/?dc9ppkru8711ggs

You could probably simplify a lot of this by using behaviors.

Edited by GamesterXIII

 
n/a

vSv



Registered
  06/04/2010
Points
  373
14th November, 2010 at 20:53:52 -

What are Alterable Value A, B and C for GamesterXIII?

I'm trying to decipher your coding and making something of my own from it, but I can't seem to understand what the values are for.
Thanks!

 
- vSv

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
15th November, 2010 at 13:55:27 -

Value A determines if the slime is falling or jumping.

Value A = 1 - Slime is jumping

Value A = 2
- Slime is falling

Value B is how strong the jumps are, and also how powerful the gravity is at any given point in time (if a slime is falling its gravity, but if its jumping its jump strength.)

Value C is what I call a buffer

Lets call Value B gravity and Value C buffer

If you did this:

Value A = 1 (falling)
- Set Y of Slime to Y + Gravity
- Add 1 to Gravity


The gravity would be extremely powerful.

Adding the buffer will result in gravity being added at a slower pace - just like it is added inside of the mfa like this:

Value A = 1 (falling)
- Set Y of Slime to Y + Gravity
- Add 1 to Buffer


^ As long as Value A = 1 the slime will be moving Downwards based on the Gravity value. 1 will also be constantly added to the Buffer . . . I think always is equivalent to 00.00.02 in MMF.

Value A = 1
+ Buffer >= 4
- Set Buffer to 0
- Add 1 to Gravity


^ When the slime is falling (Value A = 1) and the buffer value is equal to 4 or greater (this can be lowered for more powerful gravity and raised for less powerful gravity) it resets to 0 and adds one to the gravity value.

Thats about the best I can explain it at the moment . . . hopefully it helps.





Edited by GamesterXIII

 
n/a

vSv



Registered
  06/04/2010
Points
  373
15th November, 2010 at 16:01:48 -

Thanks! It helped out a lot, let's see if I can work something out from this now, seems stable if i tweak it some more.

Edited by vSv

 
- vSv

vSv



Registered
  06/04/2010
Points
  373
15th November, 2010 at 19:48:33 -

Hello again!

GamesterXIII, I used your file and put it inside my file, this is how it is now: http://www.mediafire.com/?5fzyq48b9boqf8v .
The thing is that every time the Bot makes a jump towards a wall it will glide through the wall or glide upwards at the wall, and I can't find a way to fix this, do you know a solution for this? It works fine when it just tries to move towards the wall but fails every time it attempts a jump.
Thanks!

 
- vSv

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
15th November, 2010 at 21:07:56 -

Personally I would not use this method as I am a perfectionist, but this is probably the simplest solution to your problem.

I'm pretty sure the only 100% flawless method would be to add sensors for each individual Bot.

http://www.mediafire.com/?h3jr0s6ah73jcpq

 
n/a

vSv



Registered
  06/04/2010
Points
  373
15th November, 2010 at 21:25:41 -

Awesome, I don't know why I never thought of sensors before on the Bot's, otherwise your example will work but I'm also trying to build everything so that I don't need to put things like that in every stage of the game as I want everything to be working everywhere at all times, again, thank you this helped out a lot!

 
- vSv

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
15th November, 2010 at 22:37:09 -

I might be able to help you, but I'll have to work at it a bit. I'm glad that you feel the need for your stuff to be perfect .

I'm leaving in ~20 minutes so I may not get an example up here soon, but I'll try to get one with sensors for each Bot.

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
15th November, 2010 at 22:56:01 -

5 min solution

Just study the code closely as I have to go which is why I whipped this up so quickly.

I think you can incorporate the rest of what you need (horizontal movement/jumping) on your own. Just use fastloops for anything that moves in more than 1 pixel increments.

Enjoy

http://www.mediafire.com/?brec1e11hrgjpk1

Oh yeah . . . arrows move - mouseclicks add bots. Shift jumps.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click