Author Topic: Rallypoints [RELEASED v1.2, v2.3]  (Read 6192 times)

0 Members and 1 Guest are viewing this topic.

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #30 on: December 18, 2010, 10:22:13 PM »
function ScreenDraw()
   DrawBox(0, 1, 950, 660, 1000, 710, 0, 0, 0, 0.99)

 - can you explain what each one of these numbers is for/ does?

im looking to change the following -
1-colour of the box - EDIT - figured this bit out myself.

2-alter its location on the screen

3-make a circle rather than a box?

and how would i write a percentage value to send, for example, 75% of a roid's seedlings?
« Last Edit: December 18, 2010, 11:08:35 PM by AWS »

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #31 on: December 19, 2010, 04:59:01 AM »
To send 75% of seedlings:

Code: [Select]
numtosend = GetAsteroid(insertasteroidhere):GetNumSeedlings(1)
numtosend = numtosend * 0.75
GetAsteroid(insertasteroidhere):SendSeedlingsToTarget(1,numtosend,rallypoint)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #32 on: December 19, 2010, 01:00:17 PM »
DrawBox(texture ID, thickness of border, leftedge, topedge, rightedge, bottomedge, rcol, gcol, bcol, alpha)

I don't think circular boxes are possible. I'd be happy to be proven wrong though.

To sent 75% of the seedlings, just drag the slider to 75% of the distance to the left.

I---------------I-----I

Like that.

EDIT: AWS, which version are you using? That up there would work with v2.0.
« Last Edit: December 20, 2010, 01:09:30 PM by Pilchard123 »

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #33 on: December 22, 2010, 10:04:59 PM »
ah... ive only just seen your v.2
am pasting it in now along with annikk's V2 AI code!!

EDIT - i see youve changed quite a lot.
so, im going to have go through all my roids again and channge those values again aren't i?! ::)
sobeit... it'll be worth it.

and i think you can draw circles rather than just boxes...
(click to show/hide)

 - whatever that means!

aws
« Last Edit: December 22, 2010, 10:09:50 PM by AWS »

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #34 on: December 23, 2010, 12:12:32 AM »
For AWS' benefit, I reviewed all the rally point code just now and I don't see a reason why it wouldn't work fine with Infected AIv2... :>

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #35 on: December 23, 2010, 12:59:26 AM »
For AWS' benefit, I reviewed all the rally point code just now and I don't see a reason why it wouldn't work fine with Infected AIv2... :>
hehe...thx annikk
the only thing i can think of that may cause any slowing down is the fact that each roid has to be manually designated.
but thats the only thing and so far i only have 42 roids in the level...
:D

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #36 on: December 23, 2010, 01:26:19 AM »
-report just in...
well... theres definitely something going on with this for me.

first - i added annikk's v2 code. that worked fine.
then i added the rallypoint code, then it crashed at exactly the same point as before, just after the 2nd welcome screen.(approx15seconds in)
 ::)

so...for now its a choice of either having the old black box variety of rallypoints, or none at all.
i think for the purposes of trying annikk's new code, ill go without the rallypoints for now.
-end of report!

aws

EDIT - i removed the 2nd part of the rally code, leaving the 1st bit in place- the stuff that draws the box- and it works fine.
so it's something to do with the 2nd part- the long, per-roid edited section...
« Last Edit: December 23, 2010, 01:33:16 AM by AWS »

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Rallypoints [RELEASED v1.2, v2.0]
« Reply #37 on: December 23, 2010, 08:36:15 AM »
AWS, can you post your LevelLogic code please, with the rallying code all there? I think I might know the problem, but need to check something first.


EDIT: Since in the Infected beta thread you said you didn't like the positioning, I'm going to change it slightly to allow you to move it around easily.
« Last Edit: December 23, 2010, 09:45:40 AM by Pilchard123 »

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Rallypoints [RELEASED v1.2, v2.1]
« Reply #38 on: December 23, 2010, 09:46:35 AM »
Uploaded

v2.1
Added easy-to-alter position stuff for the slider and button. While they will stay the same size (unless you feel like changing that too), changing buttontop and button left will move the button around, and bartop and barleft will move the sliderbar around. 0,0 is the top-left of the screen.

EDIT: It's there now, don't know why it wasn't before.
« Last Edit: December 23, 2010, 02:47:50 PM by Pilchard123 »

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Rallypoints [RELEASED v1.2, v2.1]
« Reply #39 on: December 23, 2010, 07:10:58 PM »
i had a thought as i going to sleep last night and then again as i woke this morning (i need help!!) that perhaps it is a case of merely placing the chunk of code in the right order.
i know that if i place the greeting, for example, after the AI code it wont work in game. the level will load but the message wont appear, so perhaps that is something to consider.
also, annikk. requires his AIv2 code to be placed specifically at the end of the first section, which must mean that there are definite reasons for certain placements of code.

perhaps breaking it up in the manner i am currently doing is causing this crash? ill send you my whole code if you like Pilchard, so you can see what im dealing with in here  ;D

ive added v2.1 and will test a couple of ideas first, then report back...

aws

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Rallypoints [RELEASED v1.2, v2.1]
« Reply #40 on: December 23, 2010, 07:23:53 PM »
interesting -
in the function level logic section (what i call the 2nd section!), in this order -

Greeting, Colourwave/ background, Victory trigger, Rallypoint, AI
- the game crashes after the 2nd welcome message that describes how to use the rallypoints. and you have to Ctrl-Alt-Del out of it.

in this order -
Greeting, Rallypoint, Colourwave, Victory trigger, AI -
after you click OK on the 2nd msg box, instead of freezing like above, the message box fades to a lower alpha level, (lighter grey colour, but still visible), and the game slows to neolithic speeds..as if its trying to figure things out one bit at a time.

I think it has something to do with the fact i have to have this code for each and every roid in the map. i currently have 42 roids. this doesnt seem like too many to me, but perhaps from the perspective of having to run this code for every one of them, it causes too much of a lag, or freezes?

in any case, id prefer to send you all my code via PM if i can, so you can tell me what elementary mistake im making. :D

aws

 PM me when you can so i can send this to you. (dont want to post everything i have on here)
« Last Edit: December 23, 2010, 07:30:08 PM by AWS »

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Rallypoints [RELEASED v1.2, v2.1]
« Reply #41 on: December 24, 2010, 11:03:20 AM »
Just take out the message, see if that helps. (I have PM'd you with another idea)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Rallypoints [RELEASED v1.2, v2.1]
« Reply #42 on: December 24, 2010, 01:41:19 PM »
Okay...

I think it works now. v2.2 being uploaded ASAP.

v2.2
Made it work.
Replaced loooooooooooooong hardcoded section with softcoded for loop (finally!). Requires a variable numroids, equal to the total number of asteroids (not the highest ID) in your map.

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Rallypoints [RELEASED v1.2, v2.1]
« Reply #43 on: December 24, 2010, 05:38:30 PM »
replaced with v2.2
(removed text!)
where should this numroid varible be placed, though? and how should it be written?


Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: Rallypoints [RELEASED v1.2, v2.1]
« Reply #44 on: December 24, 2010, 06:42:11 PM »
It's at the end of the LevelSetup() section, already there. All you have to do is change it to whatever your level needs it to be.