Page 2 of 2
RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 2:24 am
by ernieschwitz
Sorry I meant ExecGiveActionCard

RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 2:26 am
by ernieschwitz
Also I would like the engine to announce to other player what player X removed if possible, so the removal is transparent to all players.
So could you get me the revised code for that please?
Not sure its possible to make it exactly what has been removed. At least not without some very lengthy code.
EDIT: I think I figured out how to present it to the players what has been removed, ... but still requires abit of code.
RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 2:38 am
by ernieschwitz
Oh #### i think it is a bit harder to make this event than originally anticipated. I think we need to make a PreSelectEvent...
Thats what i get for drinking beer and programming at the same time...

RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 2:39 am
by gazfun
Your previous comments
The first line is not something you need. Unless you want to execute the card, when the event is run.
The second line should read ExecRemoveTroops(tempvar2, tempvar3, -1, 100)
I am guessing tempvar2 and tempvar3 are transfered with the card command.
Ok, that card looks nice.
What you need is to add a line of code to deal the card (and remove it if unused so they don´t get loads and loads of the card)...
Most likely you will need to make an event. Something like.
Event Name: Add new card, execute: Early turn check
0). TempVar0 = CheckTurn
1). ExecRemoveActionCard (relevant data using tempvar0 as regime)
2). ExecAddActionCard (relevant data using tempvar0 as regime
Is this all code for the one Card?
RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 2:49 am
by gazfun
ORIGINAL: ernieschwitz
Oh #### i think it is a bit harder to make this event than originally anticipated. I think we need to make a PreSelectEvent...
Thats what i get for drinking beer and programming at the same time...
I really appreciate, your effort. perhaps we could have a beer together LOL
RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:14 am
by ernieschwitz
Ok, i made a card that does what you want.
I can´t make it say what has been removed, BUT I can make it say how many powerpoints has been removed and how many subformations it consisted of.
First the events, i made 3, they are seen in the following screenshot. Their names doesn´t have to be exact, but the contents does, but we have yet to come to that.

RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:16 am
by ernieschwitz
Here is the event the card needs to execute

RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:18 am
by ernieschwitz
Please note the text message in the lowest part of the screen. It has to be
[regimename][tempvar]1[/tempvar][/regimename][stringlist]1[/stringlist]
RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:19 am
by ernieschwitz
And finally the deal cards event...

RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:21 am
by ernieschwitz
Finally the card itself:

RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:23 am
by ernieschwitz
Note that you can set it to 0 PPs, so no player is forced to pay for lossing his troops.
Note also that you can switch those numbers around as you like.
Just remember that 0 is where you are going to put the PreSelect ALL units event
and that 1 is where you are going to put the RemoveUnit event.
RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:25 am
by gazfun
Oh wow thats great........So when and where can we have that beer [:)]
Ill get to it, and get back to you in a couple of days
RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:27 am
by ernieschwitz
You come to Denmark, and we will have a Danish Beer

...
Better yet, if I was to be in the neighborhood, you owe me one

RE: Making action Cards to remove units
Posted: Fri Dec 13, 2013 3:33 am
by gazfun
your on, just send me a email, PM here
Ill send you my email by PM
RE: Making action Cards to remove units
Posted: Mon Dec 16, 2013 8:11 pm
by ernieschwitz
Please note, this code only selects the first unit of all units. In other words my coding was flawed...
However I have made a version that works, and emailed it to Gazfun

I will post the code if someone wants to know.