Topic Options
#125088 - 01/18/09 11:21 PM Need help getting my jump code working
mobichan


Registered: 10/07/07
Posts: 383
Loc: Bay Area, CA
So, I've been tinkering with this for a couple hours, but I can't seem to get it to do exactly what I want. The code is meant to make one of the 3 enemies jump when spacebar is pressed. I am using some jump code that seems tricky to use with how MMF2 selects objects. I thought I finally set up the fastloops correctly, but the jumping is getting cut off just as it begins.

Can someone pleeeeeease take a look?

Mobichan


Attachments
enemy_test.mfa (11 downloads)
Description: Jumping code that is meant to work with multiple instances of an active object.


_________________________
www.pixellicker.com

Top
#125131 - Yesterday at 10:51 AM Re: Need help getting my jump code working [Re: mobichan]
_LB


Registered: 06/07/07
Posts: 887
Loc: Richardson, Texas, America.
Just use this:

+Upon Pressing Spacebar
+Pick one of Enemy at random
:Do jump stuff
_________________________
Check the awsome games at http://ragdollsoft.com/
~Multimedia Fusion 2 Standard User~
My Site - LB-Stuff
-LB

Top
#125140 - Yesterday at 11:22 AM Re: Need help getting my jump code working [Re: _LB]
mobichan


Registered: 10/07/07
Posts: 383
Loc: Bay Area, CA
I don't think that will work in the long run. The problem I am running into now is that I have an object referring to a variable of another object. The second object (the one referred to) isn't getting picked. I really need to find a way to make sure both objects (in this case, the drop shadow and enemy) are selected when the jump is activated (ie, when the JumpTimer variable is set).

I will eventually need a code solution for making each enemy follow a set of routines. The use of spacebar and a random number was to see if I could get a simple command working to make one of the enemies jump. Ideally, I will want to make some way for the instances to each be able to independantly run a core set of routines (follow, attack, idle, etc) without crossing each other's wires up.

Does that make sense or am I overthinking this?

[Edit]: I tried the select object at random and it still doesn't work.


Edited by mobichan (Yesterday at 11:45 AM)
_________________________
www.pixellicker.com

Top


Site Links
Forum Index

Home Page
Online Store
Tutorials
Download Center
French Forum
Quick File Links
Multimedia Fusion 2
Updates - build 248
Standard Version
Developer Version

Extension Packs
Bonus Pack 1
Bonus Pack 2
z33z Extension Pack
LIJI Extension Pack

The Games Factory 2
Latest Update - build 248
Community Links
Madword Arcade

GameBuilder
Fusion2Developers
The Daily Click

Extensions
Neatwares Extension List
Extension Updater (FusionUpdater)
Zoom Gamer
Click Chat
6 People are chatting