Author Topic: Help Please :)  (Read 2711 times)

Offline Harky

  • Newbie
  • *
  • Posts: 43
Help Please :)
« on: November 23, 2005, 03:05:02 PM »
I am looking for ideas how to make a vech  "get infected" actualy just change side to teh infected side when they go adjacent to the blight. If u were playing  and one of your linx drove right up to the blight it would be "infected" and change to the AI controling the infected vechs thus turning on u  like in eden mission 4. i was wondering if anyone could help me set up some code for this.

Some code Hacker gave me.. may be of some help

LOCATION loc = yourUnit.Location();

GameMap::GetTile(LOCATION(loc.x-1, loc.y-1));
GameMap::GetTile(LOCATION(loc.x, loc.y-1));
GameMap::GetTile(LOCATION(loc.x+1, loc.y-1));

GameMap::GetTile(LOCATION(loc.x-1, loc.y));
GameMap::GetTile(LOCATION(loc.x+1, loc.y));

GameMap::GetTile(LOCATION(loc.x-1, loc.y+1));
GameMap::GetTile(LOCATION(loc.x, loc.y+1));
GameMap::GetTile(LOCATION(loc.x+1, loc.y+1));


Also what does the .DoInfect() do to a vech?


 

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Help Please :)
« Reply #1 on: November 23, 2005, 04:39:42 PM »
Umm, I'm not sure if what you want is all that possible. From what I gather of Eden mission 4, you were basically just going up against another player who also happened to be Eden. The blight infection part was really just part of the story. I don't think there was no blight in that level as far as the game engine was concerned. If blight overtakes a unit, it will be destroyed. Buildings are the only thing I've seen that can "live" after being infected. Also, if an AI takes over a unit that is next to blight, it'll be pretty short lived if they don't move the unit right away. Or maybe there is something I don't know about. I've never much noticed that DoInfect() function on the Unit class, but it might only apply to buildings.


 

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Help Please :)
« Reply #2 on: November 24, 2005, 01:07:41 PM »
I'll look into this.
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3093
Help Please :)
« Reply #3 on: November 27, 2005, 01:37:53 PM »
The .DoInfect() causes the building to say "Disabled-Infected" and it plays the virus sound.

I'd imagine it'd kill a vehicle, but who knows for sure.

What you'd need to do is scan the tile data next to the vehicle for the blight bit, and if it exists, just .DoTransfer(newPlayer) to the AI player.

Offline Betaray

  • Administrator
  • Hero Member
  • *****
  • Posts: 2897
Help Please :)
« Reply #4 on: November 27, 2005, 01:55:23 PM »
and than is it possible to make it so that the blight player is immune to the blight?

like put a code that says, ignore .DoInfect() for player blight or somthing?
I am the nincompoop, I eat atomic bombs for breakfest, fusion bombs for lunch, and anti-matter bombs for dinner

I just hope they don't explode

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Help Please :)
« Reply #5 on: November 27, 2005, 09:32:39 PM »
No. That's what I was saying before. Even if you transfer the unit, it'll just be destroyed by the blight unless the AI moves it away quickly.

Sure, you can probably try hacking the game. But that's something you should avoid if you can. Besides, this might not be such an easy edit. It seems pretty likely that you'd need some kind of code overwrite to make it work.

 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Help Please :)
« Reply #6 on: December 04, 2005, 06:07:26 PM »
I'm pretending all of this can be done, so just go with me on this. It makes me feel special.  :P

So, the first thing to do would be to get units/buildings to be transfered to the AI upon infection. Maybe an exe mod/hack/etc could be used to make blight passable and if a vec goes on it, nothing would happen. Except for your map, you will have the "give infected to AI" code to give the vecs to the AI. Then I guess you just always tell it to attack a random base.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Help Please :)
« Reply #7 on: December 04, 2005, 06:17:34 PM »
Hmm, this could require changes to the path finding algorithm. That could be a pain. It'd also likely require changes to unit behaviour, and maybe the blight behaviour too.

It could be a cool effect. But I think for the idea to be complete, you also need to have research that would allow your units to exist withint the bilght without being infected for short periods of time. Kinda like in that mission where you return to an old infected base. That would also give you a chance of killing the AI, since their base will be protected by a cloud of blight. Killing of their vec factories might give you more time to relocate your base. But then, you could have units leave the blight once they entered. At least not without some kinda bad side effect. Like leaving a trail of blight behind them.
 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Help Please :)
« Reply #8 on: December 05, 2005, 03:27:58 PM »
Or they would just get infected if they were in it for too long.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Harky

  • Newbie
  • *
  • Posts: 43
Help Please :)
« Reply #9 on: December 10, 2005, 12:03:16 AM »
That seems really hard to do.. i think im gunna remove this idea from the survivor maps.. but still ned a way to transfer buildings to another player

Offline Nightmare24148

  • Full Member
  • ***
  • Posts: 148
Help Please :)
« Reply #10 on: December 23, 2006, 08:41:47 PM »
Well Ive thought of Eden Map 4, and Ive deduced this.

Its just a plain Eden player and they modofied most of the buildings to have status of Infected?

The Lynxes are still there and live.
The Guard Posts still work.
The Tokomak is still up.
And units come out of the Garages, tho they are Infected if I remember correctly.

Now I'm quite sure Dynamix meant for units to goto the Blight, or just become unusuable by you if Infected, but couldn't do that with time constraints...vehicles still exsist in the Novellas in the Blight. Hell in Mission 4, you ARE, according to the story on Blighted land.
I look to see, in the mirror.

All I see, is that he is me.