New Dynamic Script Ideas
Sword Fighter
Posts: 343
Joined: 18 Dec 2011, 12:05
KaM Skill Level: Beginner
Website: https://github.com/andreus791/maps_feedback
Location: Russia
Re: New Dynamic Script Ideas
some new additions:
6323 Actions.AIDefencePositionRemoveAll(aPlayer)
6323 States.StatAIDefencePositionsCount(aPlayer)
6328 MultipleTypes for StatHouseTypeCount, StatUnitTypeCount
6331 MultipleTypes for killed, lost units and produced wares
6336 Actions.OverlayTextHide(aPlayer)
Re: New Dynamic Script Ideas
Sword Fighter
Posts: 343
Joined: 18 Dec 2011, 12:05
KaM Skill Level: Beginner
Website: https://github.com/andreus791/maps_feedback
Location: Russia
Re: New Dynamic Script Ideas
Re: New Dynamic Script Ideas
Re: New Dynamic Script Ideas
to
Actions.ConnectRoad(aPlayer, X, Y, X2, Y2: integer; finished: boolean); - if finished = true then scirpt will make finished roads instead of plans.
Actions.HouseAddBuildingProgress(aHouse: integer) - script should give building materials if there arent any. or new script Actions.HouseGiveBuildingMaterial(aHouse: integer) - that should be neater.
I want to:
i put plan > laberer goes there and make ground for house > when his job is done, script give materials to that houseSite, and laborer start to build it
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
Re: New Dynamic Script Ideas
Actions.PlanConnectRoad(aPlayer, X, Y, X2, Y2: integer);
to
Actions.ConnectRoad(aPlayer, X, Y, X2, Y2: integer; finished: boolean); - if finished = true then scirpt will make finished roads instead of plans.
Actions.HouseAddBuildingProgress(aHouse: integer) - script should give building materials if there arent any. or new script Actions.HouseGiveBuildingMaterial(aHouse: integer) - that should be neater.
I want to:
i put plan > laberer goes there and make ground for house > when his job is done, script give materials to that houseSite, and laborer start to build it
Re: New Dynamic Script Ideas
That would be very helpful, for now i have to check if on House posiitons is laborer. Every house has specific tiles so it will be huge table to write
Could States.HouseResourceAmount returns -1 if its wrong ware type ?
I want to make script for copy houses like this:
- Code:
begin result:= -1; if (aHouse > 0) and InRange(toPlayer, 0, MAX_PLAYERS-1) then begin t:= States.HouseType(aHouse); x:= States.HousePositionX(aHouse); y:= States.HousePositionY(aHouse); //copy wares for k:= 0 to 27 do begin wares_count[k]:= States.HouseResourceAmount(aHouse, k); end; Actions.HouseDestroy(aHouse, true); h:= Actions.GiveHouse(toPlayer, t, x, y); if h > 0 then begin //paste wares for k:= 0 to 27 do begin if States.HouseResourceAmount(h, k) <> -1 then Actions.HouseAddWaresTo(h, k, wares_count[k]); end; end; result:= h; end; end;
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
Re: New Dynamic Script Ideas
Great thanks! Hm im thinking about, States.HouseSiteIsDigged(aHouse: integer) - returns true if laborer finished digging ground for house to start build.
That would be very helpful, for now i have to check if on House posiitons is laborer. Every house has specific tiles so it will be huge table to write
Could States.HouseResourceAmount returns -1 if its wrong ware type ?
I want to make script for copy houses like this:
if States.HouseResourceAmount(h, k) <> -1 then
to:
if wares_count[k] > 0 then
Re: New Dynamic Script Ideas
Re: New Dynamic Script Ideas
Re: New Dynamic Script Ideas
You cant change the range of bowman/xbow shoot, and you will not able to do that in near future.
If you want read range, just set it to global const, its same for xbow and bows, i think it will be: SHOOT_RANGE = 11; you have to count tiles by yourself to be accurate.
If i misunderstand you, tell me more about your idea.
Posts: 3822
Joined: 16 Sep 2007, 22:00
KaM Skill Level: Skilled
ICQ: 269127056
Website: http://lewin.hodgman.id.au
Yahoo Messenger: lewinlewinhodgman
Location: Australia
Re: New Dynamic Script Ideas
Michal you want to Set the range or Read the range?
You cant change the range of bowman/xbow shoot, and you will not able to do that in near future.
If you want read range, just set it to global const, its same for xbow and bows, i think it will be: SHOOT_RANGE = 11; you have to count tiles by yourself to be accurate.
If i misunderstand you, tell me more about your idea.
//Archer properties
RANGE_ARBALETMAN_MAX = 10.99; //KaM: Unit standing 10 tiles from us will be shot, 11 tiles not
RANGE_BOWMAN_MAX = 10.99;
RANGE_SLINGSHOT_MAX = 10.99;
RANGE_WATCHTOWER_MAX = 6.99; //Measured in KaM. Distance from the doorway of tower
RANGE_ARBALETMAN_MIN = 4; //KaM: We will shoot a unit standing 4 tiles away, but not one standing 3 tiles away
RANGE_BOWMAN_MIN = 4;
RANGE_SLINGSHOT_MIN = 4;
RANGE_WATCHTOWER_MIN = 0; //In KaM towers have no minimum range, they will shoot any unit less than the range
Re: New Dynamic Script Ideas
returns true for "army type" units if they havent any order (like walking, attacking, shooting)
Castle Guard Swordsman
Posts: 1912
Joined: 03 Oct 2008, 22:00
KaM Skill Level: Skilled
Location: "Pawel95" on Youtube.com
Re: New Dynamic Script Ideas
Return to “Ideas / Suggestions”
Who is online
Users browsing this forum: No registered users and 1 guest