New Dynamic Script Ideas
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
Hmm no its desont looks strange it look exsacly like u destroy your own house when the serf coming to it - its the same situation
How about UnitLock? You see your unit but cant control it ?
Re: New Dynamic Script Ideas
As long as the player realises the resources have been taken by the script. Cancelling all of the serfs' deliveries is a bit complicated to implement but it could be done.Hmm no its desont looks strange it look exsacly like u destroy your own house when the serf coming to it - its the same situation
I think it should be GroupLock, since you can't control units that aren't soldiers, and there's no point only locking some of the soldiers in a group.How about UnitLock? You see your unit but cant control 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
Yes,i mean GroupLock but unitlock can be usefull to freeze entire town for cinematic purpose etc, and from unitlock we can easily make GroupLock.I think it should be GroupLock, since you can't control units that aren't soldiers, and there's no point only locking some of the soldiers in a group.How about UnitLock? You see your unit but cant control it ?
Re: New Dynamic Script Ideas
UnitLock mean lock so i was thinking about freeze or smth ;p ( i used to be map maker in warcraft 3, there was a lot similar scripts and names )
Re: New Dynamic Script Ideas
Re: New Dynamic Script Ideas
and how to force AI to not destroy exshousted mines, stones etc (with autobuild on) ?
also why i cant add stones to quarry?
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
Is there any way to check is the occupant went to inn? example: if States.HouseOccupantInInn(ahouseID) then ...
and how to force AI to not destroy exshousted mines, stones etc (with autobuild on) ?
also why i cant add stones to quarry?
When a unit is inside a house its XY position is at the door, so you can tell if somebody is in the inn by using something like:
if States.HouseType(States.HouseAt(States.UnitPositionX(U), States.UnitPositionY)) = 27 then
Re: New Dynamic Script Ideas
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
Re: New Dynamic Script Ideas
Hmm i have question , is there any way to improve FPS? The maps size will change smth? image:
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
When a unit is inside a house its XY position is at the door, so you can tell if somebody is in the inn by using something like:
if States.HouseType(States.HouseAt(States.UnitPositionX(U), States.UnitPositionY)) = 27 then
- Code:
function HouseChangeOwner(aHouse, toPlayer: integer): integer; var o: integer; begin if (aHouse > 0) and ( toPlayer >= 0 ) and ( toPlayer < 8 ) then begin o:= States.UnitAt(States.HousePositionX(aHouse), States.HousePositionY(aHouse)); //here i check if unit is in house, coz 'houseDestroy' also kills unit in it. test(o); if o > 0 then Actions.GiveUnit(toPlayer, States.UnitType(o), States.HousePositionX(aHouse), States.HousePositionY(aHouse)+1, 0); Actions.HouseDestroy(aHouse, true); result:= Actions.GiveHouse(toPlayer, States.HouseType(aHouse), States.HousePositionX(aHouse), States.HousePositionY(aHouse)); end else begin result:= -1; 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
Hmm im checking if the unit is in house and always get ' -1 ' . Heres the code:When a unit is inside a house its XY position is at the door, so you can tell if somebody is in the inn by using something like:
if States.HouseType(States.HouseAt(States.UnitPositionX(U), States.UnitPositionY)) = 27 then
btw the States.HouseOccupant(aHouseID: Integer) is pointless, its giving only type not ID of occupant, evan if the house is empty. It should be HouseToOccupantType
Return to “Ideas / Suggestions”
Who is online
Users browsing this forum: No registered users and 8 guests