Re: New Dynamic Script Ideas

KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
 

I guess you could give a player one special unit alike Barbarian and call him a "hero"
 )
 )var iAttackGroup: Integer;
var bAttack: Boolean;
procedure OnMissionStart();
begin
	Actions.AIDefencePositionAdd(1, 10, 20, 0, 0, 20, 1);
	iAttackGroup := 0;
end;
procedure OnWarriorEquipped(aUnitID, aGroupID: Integer);
begin
	if States.GroupOwner(aGroupID) = 1 and iAttackGroup = 0 then
	begin
		if States.GroupAssignedToDefencePosition(aGroupID, 10, 20) then
			aGroupID := iAttackGroup;
	if iAttackGroup <> 0 and States.GroupMemberCount(iAttackGroup) = 12 then
		bAttack := true;
end;
procedure OnTick()
begin
	if bAttack then
	begin
		Actions.GroupOrderAttackHouse(iAttackGroup, States.HouseAt(50, 50));
		bAttack := false;
	end;
end;
 
            
			         
			    
Posts: 132
Joined: 03 Aug 2015, 09:12
KaM Skill Level: Skilled
Website: https://kp-wiki.org/
Location: the Netherlands
Thank you.HouseAllow(false) it will do the jobI find it strange that nobody asked this yet (but I can't remember where did you post the link with the proposed features, so I can't actually check this), but can we please have an Actions.HouseLock command, to do the opposite of Actions.HouseUnlock?
I knew this (used it in Golden Cliffs - Bonus), but it disables wares' distribution for that building too, and if the unlock was supposed to be temporary then there needs to be dedicated scripting to re-enable it when the time comes in the construction tree... a HouseLock command would have none of these cons, and would in my opinion be a more elegant way of reverting HouseUnlock.


 
            Moorbach's Guard
Posts: 1044
Joined: 15 Apr 2012, 12:11
KaM Skill Level: Fair
Location: In the Market
"When you want to create a map via script" - why would you want to create it every time when you can create it once in MapEd?
"to set random number generator using seed" - maybe it's better to use your own seed and RNG in the script?

 
            Former Site Admin
Posts: 3814
Joined: 08 Jan 2009, 23:00
Location: California - Pacific Time (UTC -8/-7 Summer Time)
... is this script of your working?
 
            
			         
			    
Posts: 132
Joined: 03 Aug 2015, 09:12
KaM Skill Level: Skilled
Website: https://kp-wiki.org/
Location: the Netherlands
For campaigns: Actions.SetNextMission(MissionNumber: Integer);
 )
 )Return to “Ideas / Suggestions”
Users browsing this forum: No registered users and 2 guests
| Powered by phpBB® Forum Software © phpBB Group Designed by ST Software |   |