Location: JBPLAY \ Meteor 2 \ Help and Guidance \ silly script question Back to Threads |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
17 December 2008 00:54 (UK time)
so rather than tracking through 1-999, I'm wondering how to stop when the argument is validated.. ie. it finds an object that's side isn't of the player... how do I break out of the loop when the thing I'm lookingfor is found? the idea is this - we check through all the objects, looking for one that's not the players ID, and then send a bird flying after it. Of course, I'll also do a range checker, so it finds out the closest thing first, and sends the bird that way. any suggestions? It's been a while since I've coded anything. You need to login to create posts in this thread. |
arezey
![]() Joined: 16 June 2005 Posts: 1599 |
17 December 2008 15:43 (UK time)
Maybe use continue? I think it should work, but not 100% sure.
You need to login to create posts in this thread. |
ParaSait
![]() Joined: 26 June 2007 Posts: 1478 |
17 December 2008 22:44 (UK time)
Just to make it all go a little faster (but you'll still do the loop 999 times), I'd just try the Pythagoras Theory... Try this for example:
Notes: - I haven't tested it, so it may not work correctly. (It's only an example anyway) - Replace "QUADRATE" and "SQUARE" with the correct names of the functions (Which I don't know) - I still don't know how to place tabs in an internet browser text field...
Edited: 17 December 2008 22:45 You need to login to create posts in this thread. |
arezey
![]() Joined: 16 June 2005 Posts: 1599 |
18 December 2008 11:01 (UK time)
@Mrazerty 1. I don't know of the square and quadrate functions for C, but I doubt such ones exist. 2. To put tabs, just copy one and paste it there, or use spaces. You need to login to create posts in this thread. |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
20 December 2008 17:51 (UK time)
I've sorted everything out. the a2+b2=c2 doesn't work because math.h isn't implemented... and I don't think it can be ^ only means + in the script commands, so lotsa stuff doesn't work. Anyways, I've got it pretty nicely figured out, and I implemented a few extra features that should make multiplayer much more enjoyable... Mines Timebombs Tracking Missles. I'm still working out some of the bugs. =) I'll release the code sooner or later for y'all as a Christmas present! You need to login to create posts in this thread. |
DarkRain
![]() Joined: 01 March 2007 Posts: 1193 |
20 December 2008 18:49 (UK time)
me_mantis[keens wrote: Great! But what are you working on?
You need to login to create posts in this thread. |
arezey
![]() Joined: 16 June 2005 Posts: 1599 |
20 December 2008 22:04 (UK time)
@Dark Rain Shaddap, don't tempt him to spoil the secret! I like surprises. ![]() You need to login to create posts in this thread. |
ParaSait
![]() Joined: 26 June 2007 Posts: 1478 |
20 December 2008 23:45 (UK time)
arezey wrote: Umm, no, SPEAK! I DON'T like surprises =P =P
You need to login to create posts in this thread. |
DarkRain
![]() Joined: 01 March 2007 Posts: 1193 |
21 December 2008 08:47 (UK time)
arezey wrote: Ok, I just asked him. It's up to Mantis to decide whether to tell us or not.
You need to login to create posts in this thread. |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
23 December 2008 04:51 (UK time)
Hmmm Nobody ever asked me much of anything, but here's the problem. Nobody dies in multiplayer games, except when they get run over. So, we'll have to make it easier to die, because the game is balanced for everybody to not die in the missions. Thus, I just randomly decided to do a bunch of stuff. You need to login to create posts in this thread. |
|
Forums system (C) 1999-2023 by James Bunting.
Terms of Use