Pages: 1 ... 7 8 [9] 10 11 ... 64
  Print  
Author Topic: Game Maker Help Thread!  (Read 316505 times)
banna8
Mossbaby
*
Posts: 281


View Profile Email
« Reply #120 on: January 25, 2010, 12:28:34 PM »

I changed the code to this, and now it works.(except for the sprite change)

One more thing, I made a lipstick object that she spawns with, and shows up on HUD, via DariusK's tutorial, and it works great. At the moment however, it works like a throwable object,(which is realistic) I was wondering how I could make it fire a projectile. (I'm new to the whole scripting side of GM obviously)
Logged
marsgreekgod
Big Bossy
Mossy
*
Posts: 9806


The will of the Galaxy.


View Profile WWW Email
« Reply #121 on: January 25, 2010, 12:36:55 PM »

lipstick fire a projectile?
huh?

Well you could copy the gun code for it...
Logged

Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
banna8
Mossbaby
*
Posts: 281


View Profile Email
« Reply #122 on: January 25, 2010, 12:42:53 PM »

If you count a kiss-heart as a projectile, then yes! I'll try that.

aaannndd... back to the floating thing. It works (i'm amazed) But there's a bug and I dont know what triggers it. Sometimes (seemingly randomly) I'll be stuck in the sitting animation(the one selected for floating), and will be unable to attack, pickup, or throw. I can still jump, glide, and climb ladders though.

It might need to be noted that I go into the sitting sprite ONLY when this happens.
Logged
marsgreekgod
Big Bossy
Mossy
*
Posts: 9806


The will of the Galaxy.


View Profile WWW Email
« Reply #123 on: January 25, 2010, 12:50:16 PM »

I... have no clue. sorry! but yeah copying the gun code should work

(did you check you PMs? I sent  you one)
Logged

Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
DariusK
Bulb
*
Posts: 97



View Profile WWW
« Reply #124 on: January 25, 2010, 12:56:11 PM »

One more thing, I made a lipstick object that she spawns with, and shows up on HUD, via DariusK's tutorial, and it works great.
Glad you found my tutorial useful  Grin
Logged

banna8
Mossbaby
*
Posts: 281


View Profile Email
« Reply #125 on: January 25, 2010, 02:00:32 PM »

In the step event of oPlayer1, I have this:

Code:
if(holdItem)
{
    if(holdItem.type == "Lipstick" and firing == 0 and kAttackPressed and facing == RIGHT);
}

and when I'm holding my lipstick, I get this error:

Code:
ERROR in
action number 1
of End Step Event
for object olipstick:

Error in code at line 1:
   if (holdItem.type == "Lipstick" and firing == 0 and kAttackPressed and facing == RIGHT);
      ^
at position 5: Unknown variable holdItem

What'd I do wrong?  Can I set the holdItem.type for my Lipstick?
« Last Edit: January 25, 2010, 02:15:27 PM by banna8 » Logged
Arucard
Mossy
*
Posts: 2811


Hey! Is that CANDY?!?!?

Arucard.Tepes
View Profile Email
« Reply #126 on: January 25, 2010, 03:06:56 PM »

Hold item only refers to an in-game object you would pick up. I think it also has to be defined in another script, (scrHoldItem or something of the like) but not sure. Did you change it to something you switch to with the item select? As in Darius' tutorial?

It also seems from your code it is placed in the step event of the lipstick object, you should probably have it in the action code of the oPlayer1 step event.
Logged

Oh, they look like monsters to you?

There's a light in the darkness of everybody's life.
banna8
Mossbaby
*
Posts: 281


View Profile Email
« Reply #127 on: January 25, 2010, 03:11:10 PM »

yes, I did make it with Darius's tutorial.
 I had similar code in the step event for oPlayer1, but I tried to put it in the lipstick aswell  so it would dissapear after use.
Logged
Arucard
Mossy
*
Posts: 2811


Hey! Is that CANDY?!?!?

Arucard.Tepes
View Profile Email
« Reply #128 on: January 25, 2010, 03:29:15 PM »

Try commenting it out, or removing the code in the oLipstick, and add it to the items in the scrHoldItem. Chances are you'll just have to toy around with it, adding and taking things away until you get the right config. Keep looking at the scripts for items that are similar to what you want it to do. Copy some of them into an external text document so you can look at them and compare to another. Keep plugging away and you'll get it working. (Sorry it's not more helpful, but good luck)
Logged

Oh, they look like monsters to you?

There's a light in the darkness of everybody's life.
Kegluneq
Big Bossy
Mossy
*
Posts: 2260



View Profile Email
« Reply #129 on: January 25, 2010, 04:50:09 PM »

All the code for what items do when you press the action key is in scrUseItem.
Logged

A wild SHINY MOSSY appeared!
banna8
Mossbaby
*
Posts: 281


View Profile Email
« Reply #130 on: January 25, 2010, 05:50:52 PM »

Got the floating to work mostly(sprite)
Got the lipstick kiss to work.
Now I get this:

Code:
ERROR in
action number 1
of  Step Event
for object oSpiderHang:

ERROR in
action number 1
of  Step Event
for object oBat:

Error in code at line 21:
   dist = point_distance(x+8, y+8, oPlayer1.x, oPlayer1.y)
                                            ^
at position 43: Unknown variable x


Error in code at line 17:
   else if (not collision_point(x, y-16, oSolid, 0, 0) or (dist < 90 and oCharacter.y > y and abs(oCharacter.x - (x+8)) < 8))
                                                                                    ^
at position 83: Unknown variable y

___________________________________________
ERROR in
action number 1
of  Step Event
for object oItem:

Error in code at line 41:
           if (oPlayer1.facing == LEFT) x = oPlayer1.x - 4; 
                        ^
at position 23: Unknown variable facing

Also, the kissing sound is spammed as if a step thing. (might be able to figure that out.) {FIXED}

but why the spiders!?!?!? I did nothing to the spiders!!!

EDIT: I think the annoying noise is coming from a sneaky kiss that spawns in the corner. I'll have to find it somewhere in the code.

EDITEDIT: found it!

EDITEDITEDIT: I feel as if I am taking all of the attention/energy of this thread. You think I should make like a NOOBISH I DON'T KNOW WHAT I'M DOING GIRL POWER MOD thread?

EDIT ^ 4: Look at me, solving my own problems! (one less bug)
« Last Edit: January 25, 2010, 08:32:17 PM by banna8 » Logged
Kegluneq
Big Bossy
Mossy
*
Posts: 2260



View Profile Email
« Reply #131 on: January 25, 2010, 07:38:05 PM »

Yay! Don't worry about "hijacking" the thread. There is no such thing.
This thread was created for the sole purpose of people asking their questions, and having them answered.
Logged

A wild SHINY MOSSY appeared!
banna8
Mossbaby
*
Posts: 281


View Profile Email
« Reply #132 on: January 25, 2010, 08:31:27 PM »

At this point, I only see four bugs. (AWESOME!)

1) Lipstick doesnt dissapear upon use.

2) when I have > 1 bomb, I can't switch to lipstick.

3) when I switch to lipstick, I'm busted for "Theft"

4) i can duplicate items by switching to and from the lipstick.

Also, can I add lipstick to the... Misc. store perhaps, or would I need another store entirely?
« Last Edit: January 26, 2010, 02:26:25 PM by banna8 » Logged
Kegluneq
Big Bossy
Mossy
*
Posts: 2260



View Profile Email
« Reply #133 on: January 25, 2010, 09:30:35 PM »

Those are some strange bugs...
Logged

A wild SHINY MOSSY appeared!
marsgreekgod
Big Bossy
Mossy
*
Posts: 9806


The will of the Galaxy.


View Profile WWW Email
« Reply #134 on: January 25, 2010, 09:42:06 PM »

lipstick might be fixed if you add cost = 0;
Logged

Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
Pages: 1 ... 7 8 [9] 10 11 ... 64
  Print  
 
Jump to: