Author Topic: hoho  (Read 3945 times)

0 Members and 1 Guest are viewing this topic.

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 13
  • Posts: 1,035
hoho
« on: July 14, 2010, 01:10:40 PM »
Just putting in "OnAsteroidSelected" and "OnMouseLeft/RightClicked"  :o

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 13
  • Posts: 1,035
Re: hoho
« Reply #1 on: July 14, 2010, 01:19:55 PM »
If you click on an Asteroid, OnAsteroidSelected(ID) will be called. Otherwise, OnMouseLeftClicked(x,y) will be called on a left mouse click and OnMouseRightClicked(x,y) will be called for a right click. x and y are world coordinates of the mouse cursor.

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: hoho
« Reply #2 on: July 14, 2010, 03:52:05 PM »
With coordinates  do you mean of the screen? or of the level map?
Like this? :
Code: [Select]
function LevelLogic()
     OnAsteroidSelected(1 :OnMouseLeftClicked(2000,-8000)
End

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 13
  • Posts: 1,035
Re: hoho
« Reply #3 on: July 14, 2010, 04:20:50 PM »
map coords yeah.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: hoho
« Reply #4 on: July 15, 2010, 06:02:38 PM »
Once again, this will open many new possibilities for level design.  :>

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: hoho
« Reply #5 on: July 16, 2010, 02:00:29 PM »
Will it? I can't think of many, but then I didn't think of making a gravity engine, so...

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: hoho
« Reply #6 on: July 16, 2010, 02:27:47 PM »
you can without gravity engine
if you have a asteroid that is very far away?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: hoho
« Reply #7 on: July 16, 2010, 02:31:22 PM »
Oh, well, lets see...

You could create a map where clicking on a blank bit of space creates an asteroid there.  :>

You could create a map where clicking on a blank bit of space creates an ever-increasing gravity well at that location, peaking after 10 seconds before subsiding again.  Imagine what that would do in a map like Big Bang :>


You could also create a map where clicking on the background causes the background colour to change.  Why is this useful?  I haven't the slightest idea.  :>  But I'm sure it will come in handy for something !


What else, hmm..   you could have a map where you control a single, uber-tough Laser Mine.  When you click somewhere, the mine's "asteroid" (the one it is orbiting) moves - drifting toward the clicked location - although the player wouldn't see this as it has a radius of 0.  All the player would see is the mine moving about.  :>  You could build an arcade-style see-how-many-seedlings-you-can-flatten level.



Imagination ftw !

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 13
  • Posts: 1,035
Re: hoho
« Reply #8 on: July 16, 2010, 03:44:20 PM »
You could build a variation of the comet level where the "lift" asteroid moves to a different location when you click on it.

You could draw your own HUD around an asteroid with clickable buttons... we're not completely there yet but I Can add things like getting the mouse's screen coordinates, getting the screen's size, core mouse down and mouse up events that fire ragardless of what you click on, etc etc

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: hoho
« Reply #9 on: July 16, 2010, 04:27:38 PM »
You could actually build an in-game level designer with the likes of this.

You can use the Draw commands, and the Text Draw commands, to render a menu system.

Then, you can have the game add in mechanics or asteroids simply by letting the player click on stuff.  :>

Alex

  • Administrator
  • Ent
  • *****
  • Thank You
  • -Given: 3
  • -Receive: 13
  • Posts: 1,035
Re: hoho
« Reply #10 on: July 16, 2010, 04:35:11 PM »
All we'd need is to be able to save levels.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: hoho
« Reply #11 on: July 16, 2010, 04:51:24 PM »
Oh, this will also mean that designers can make tools like the long-called-for rally point, and use them in their levels.

Upon clicking a button, the script is activated.  The next asteroid the player selects is the rally point, and all their seedlings start drifting towards it (the metric shortest-path system used for Infected AI would work fine for this).  Clicking the button a second time toggles the rallying behaviour off again.

Mihhaelo

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 67
Re: hoho
« Reply #12 on: July 17, 2010, 05:25:45 PM »
Quote
Oh, this will also mean that designers can make tools like the long-called-for rally point, and use them in their levels.

Upon clicking a button, the script is activated.  The next asteroid the player selects is the rally point, and all their seedlings start drifting towards it (the metric shortest-path system used for Infected AI would work fine for this).  Clicking the button a second time toggles the rallying behaviour off again.

Wouldn't it be more accuarte to say "This means i can make a bit of code that does this and the rest of the community can use the template i provide them"  :)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: hoho
« Reply #13 on: July 17, 2010, 08:50:25 PM »
Judging by some of the posts lately I would think some designers will be able to start building their own mechanics pretty soon.. :>

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: hoho
« Reply #14 on: July 17, 2010, 09:45:01 PM »
Working on it. If I see the word 'check' one more time I think I'll scream.


Oh, no, there it is! *AAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHH!!!!!!!!1!!!!!!!1!!11!!!!!!!!!!one!!!!!!*