Page 1 of 1

ExecSetSpecial

Posted: Tue May 17, 2011 8:11 am
by lancer
G'day,

I've read this in the ATG manual.
Special Graphics
A hex can have a special graphic on it. This has no effects other then showing an extra
graphic on it. Special graphics work the same as Landscape Types and basically it is an extra
Landscape Type + Sprite assignment, but purely for artistic purposes.

Which is what I'd like to do - put a small graphic over certain hexes (locations) as a player aid.

I'm assuming - incorrectly? - that the tool to do this is the following new function
ExecSetSpecial(SpecialType,SpecialSprite,X,Y)

Having read the documentation (ahh hmmm...) for this particular bad boy I find myself in need of enlightenment.

There are four parameters for the function. 'x' & 'y' I can handle.

I have dutifully uploaded my correctly sized png sprite to the /graphics/ATG directory and called it 'red_cross.png'. You can see it there down near number four. (Having put the thing there while trying to get the function to fire I can't figure out how to remove it...)

How the first two function parameters work is a mystery.

To aid in any explanation I've taken a screenshot of the relevant editor page and stuck a few numbers anywhere that I thought might be relevant.


Image


Thanks in advance.


Cheers,

Lancer

RE: ExecSetSpecial

Posted: Tue May 17, 2011 9:35 am
by Vic
hi lancer,

you can use "pick draw type" to draw specials on the map. (or draw them dynamically through scripting using the exec you just mentioned)

i think the issue is you need to put the red cross in the first of the 3 graphics slots.

best regards,
Vic


RE: ExecSetSpecial

Posted: Tue May 17, 2011 10:16 am
by lancer
G'day Vic,

I'm aiming for a dynamic placement triggered by an action card.

If I want to place my red cross over a location then am I correct in inserting it as a special sprite (in first place, not last -Number 4 in the pic) for the specific location I want (number 2 in the pic - eg. oilfield)?

I now use ExecSetSpecial function in a script but what are the first two parameters (Special Type & Special Sprite) referring to?

Using the pic above are you able to give me an example, eg. ExecSetSpecial(46,1,x,y)?

Cheers,

Lancer

RE: ExecSetSpecial

Posted: Tue May 17, 2011 12:19 pm
by Vic
execsetspecial(46,8,x,y)

special type = landscape type # (#1 in your screenshot)
special sprite = the sprite # of that landscape type (#2 in your screenshot)

let me know if you get it working.

best,
Vic

RE: ExecSetSpecial

Posted: Thu May 19, 2011 1:33 am
by lancer
G'day Vic,

I can get the function to dance but not to the correct tune.

My test is to be able to place a red cross over a Raw level 1 location.

In short if I do this...

Image

I get this...

Image

Notice that the red cross overdraws the terrain sprites nicely but tucks in behind the location specific sprite (the Raw resource).

I've played around with this for quite a while and found the following...

Image

The Raw Level 1 location type has a reference back to Landscape type 46, sprite 8.

I've cloned the Landscape type 46 (Locations) and called it 'Cameron' (pic above, no. 50)

I've replaced sprite no.8 with my red cross and using the script above, obtained the results above.

Tried placing a red cross in all three blue arrow slots ( '1' in the pic ). Tried all different combinations of the two toggles next to the arrows ( '2' in the pic ). Consistently get the red arrow being drawn between the terrain sprites and the location sprite.

No combination of blue arrows or button toggles seem to affect this.

Interestingly if I revert to the orginal Landscape type (46 'Locations') and insert my red cross into the number 8 sprite position I end up with the entire map having every raw resource lvl 1 location with a red cross hiding beneath the location sprite.

If I take the red cross out of the number 8 sprite position and instead put it in any of the other blue arrow slots I get zip - nothing happens. This doesn't improve if I run through the combination of button toggles as above ( '2' in the pic ).

In summary I can clone the landscape type and produce a red arrow on the map using the SetSpecial function but my graphic is hiding underneath the location sprite, not on top of it.

Am I missing a step or have I banged up against the limits of the editor?

Cheers,
Lancer