Author Topic: boss question  (Read 6339 times)

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
boss question
« on: 2005-12-17, 11:43:56 AM »
I
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: boss question
« Reply #1 on: 2005-12-17, 01:27:35 PM »
Well, if it's something to make parts of the bridge fall, my first idea would be something like one of the following:
  • The boss jumps around three or four times in random places.  If you get caught underneath, major damage
  • The boss jumps way up into the air and is off screen for a few seconds.  Then you see its shadow, getting bigger, so you can get out of the way (but only for like half a second) and then one major whammy that kills you (or takes you down to one hitpoint maybe) if you are underneath it
  • The boss gets onto the bridge and starts throwing pieces of the bridge at you, or shoots at you and in the process of him being on the old bridge, since it's old, it just falls apart
  • Finally, the boss could smack the ground that sends a shockwave where you need to jump just before he hits the ground to avoid it (and coincidentally, the shockwave jostles the bridge)

That kinda what you're looking for?
Edward Dassmesser

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #2 on: 2005-12-17, 08:39:26 PM »
i like the last idea a lot (the shockwave one), im just not sure how to implement it, maybe it could create an "invisible" tiny sprite in the center of the crater, and the boss jumps up and coincidently lands on it when he causes the shockwave, then when he hits it, it creates a very long "invisible" sprite across the ground, and if you are on the ground (touching it), you recieve damage. ill have to test that idea a bit later, but thats great.

--edit--
oh, and 1 more question, would there be a way to make the screen shake slightly for like a sec or 2, like maybe have it activate similarly to the way the multiple hitpoint enemies do, where the script is activated by a function called up by the collision
« Last Edit: 2005-12-17, 08:43:19 PM by billybob884 »
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: boss question
« Reply #3 on: 2005-12-18, 03:01:42 AM »
As for the invisible sprite thing, you don't actually mean all of the pixels are invisible, right?  (Since then there's no collision detected)

Second, my idea for the shockwave would be to create three or four "rumble" sprites (which basically just look like movement lines) that move rather quickly outward (three or four in each direction).  They could be animated or whatnot, then if any of those touch you, you get hurt.  But your way works too.

As for the shaking the screen effect, I'm sure it could be done, but it's 3:00 AM and I currently have the mental capacity of a bag of hammers.  It would have something to do with an inventory item that is set to (framerate * no. of seconds of shake) when the boss hits the ground and a global special function that continuously subtracts one from it.  In the script, check if that inventory is more than zero.  If it is, offset the display a random amount in the x and y coordinates (possibly you could multiply this random amount by some divisor of the inventory so the shake is drastic at first, but decreases as it reaches the end) and display it.  That would probably work well.  Just check for the inventory in the Player_OnAfterMoveSprites() and use the drawMap function (I think that's what it's called).  I guess my mental capacity wasn't so far gone.
Edward Dassmesser

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #4 on: 2005-12-18, 12:08:40 PM »
As for the invisible sprite thing, you don't actually mean all of the pixels are invisible, right?

heh nah, thats why i put it in quotes.

Second, my idea for the shockwave would be to create three or four "rumble" sprites (which basically just look like movement lines) that move rather quickly outward (three or four in each direction).
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #5 on: 2005-12-24, 08:33:11 PM »
ok, ive got a little problem, ive got the random boss choice setup goin on, and ive got the 'selector' set to random points, but it will only make one choice... i'll post a zipped file later on tomorrow, right now ive still got a little bit of last minute wrapping to do (heh, procrastination is the story of my life)
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: boss question
« Reply #6 on: 2005-12-25, 09:13:10 AM »
You might want to double-check the documentation on "Follow Path Random Points" if you haven't lately.  The sprite will only go to a point that is at least as close as the distance between the first and second points in the path.  So you want to make sure that when you create the path, you make the second point plenty far away from the first point.  This rule allows you some limited ability to restrict which points the sprite can jump to.  For example, if you have a set of points that go around a corner, you probably don't want the sprite trying to head directly from the first point to the last point (it might get stuck on the corner).  So you just make sure that the last point is farther away from the first point than the second point is.

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #7 on: 2005-12-25, 03:45:28 PM »
o




heh yea that might be a problem, ill take a look at that once i get home
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #8 on: 2005-12-25, 07:17:13 PM »
yes! worked!
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #9 on: 2006-01-22, 05:25:24 PM »
oh, and 1 more question, would there be a way to make the screen shake slightly for like a sec or 2,


ok, i realize that this probably should be posted in the scripting forum, but its here for referrence. remember when i asked about this, well would it be possible to have a slight vibration while on a map? nothing severe at all, just like a slight tremor. see, after you kill the final boss, you're going ot fall through a trap door or something, (basically, whatever way you get there) you have like a one minute "exciting final escape", like a self destruct-enduced thing. its like the boss's last effort to kill you, ya know?
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: boss question
« Reply #10 on: 2006-01-22, 09:34:14 PM »
Yes.  ShakeDelta is the number of pixels it shakes every frame, ShakeMax is how far it shakes before it shakes in the other direction.

Code: [Select]
Dim ShakeDelta, ShakeMax, curShake

ShakeDelta = 3
ShakeMax = 12
curShake = 0

Sub Player_OnAfterMoveSprites()
   With ProjectObj.GamePlayer
      .MapScrollX = .MapScrollX + ShakeDelta
      .rMap.draw .MapScrollX, .MapScrollY
   End With
   curShake = curShake + ShakeDelta
   If abs(curShake) >= abs(ShakeMax) then
      ShakeDelta = ShakeDelta * -1
      ShakeMax = ShakeMax * -1
      curShake = 0
   End If
End Sub

HostObj.SinkObjectEvents ProjectObj.GamePlayer, "Player"
HostObj.ConnectEventsNow()
ProjectObj.GamePlayer.Play 16
Edward Dassmesser

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #11 on: 2006-01-22, 09:37:56 PM »
ok, but i need to specify a map... so just like "6-2FinalEscape"

---edit---
works great by the way! just put it in (surprisingly i did it right,) and it shakes like a pro!
« Last Edit: 2006-01-22, 09:45:35 PM by billybob884 »
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: boss question
« Reply #12 on: 2006-01-22, 09:48:11 PM »
Then I think you put a line something like this before the line with the "With":
Code: [Select]
If ProjectObj.GamePlayer.rMap.Name="6-2FinalEscape" Then
And put another "End If" after the existing "End If".

I say "something like" because I didn't test that or even look anything up in the Scripting Reference, but it really should be something like that, and hopefully exactly that :).

billybob884

  • Contributor
  • Fanatic
  • **
  • Posts: 355
    • AOL Instant Messenger - billybob884
    • View Profile
Re: boss question
« Reply #13 on: 2006-01-22, 09:51:59 PM »
lol hopefully..., because we all know my scripting abilities aren't beyond 'uh oh, doesnt work'.
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." :: Hitchhiker's Guide to the Galaxy