Map Database  •  FAQ  •  RSS  •  Login

New Dynamic Script Ideas

<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 28 Nov 2013, 16:32

Re: New Dynamic Script Ideas

How about UnitLock? You see your unit but cant control it ?
<<

Lewin

User avatar

KaM Remake Developer

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

Post 29 Nov 2013, 02:54

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 :P - its the same situation
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.
How about UnitLock? You see your unit but cant control it ?
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.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 29 Nov 2013, 08:15

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 :P - its the same situation
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.
Great!
How about UnitLock? You see your unit but cant control it ?
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.
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.
<<

Lewin

User avatar

KaM Remake Developer

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

Post 29 Nov 2013, 08:34

Re: New Dynamic Script Ideas

How about UnitLock? You see your unit but cant control it ?
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.
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.
You're describing something different there. I thought GroupLock would just stop the player from controling the group, but otherwise they would keep behaving like normal. You described UnitLock as if it makes them freeze in the middle of whatever they are currently doing.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 29 Nov 2013, 11:04

Re: New Dynamic Script Ideas

UnitLock like freeze, UnitHide , hide and freeze unit till unhide ( it might be usefull in cinematic). Maybe we can call new script GroupControl(aUnit: integer; On/Off: boolean)? - it takes players control away , but still leaves it to script ( like orders etc ) - very usefull when you want to have more ppl in multi.
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 ) :)
<<

Bence791

Knight

Posts: 618

Joined: 20 Jul 2012, 20:25

KaM Skill Level: Beginner

Location: Hungary

Post 29 Nov 2013, 13:22

Re: New Dynamic Script Ideas

You can use GroupOrderWalk for "GroupControl" ;)
The Kamper is always taking my colour!

<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 02 Dec 2013, 14:39

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?
<<

Lewin

User avatar

KaM Remake Developer

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

Post 02 Dec 2013, 23:58

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?
Internally in the KaM Remake houses have two kinds of resources they can store: "in" (consumed by the house) and "out" (to be taken somewhere else by serfs). At the moment you can only change the "in" resources. I'd like to make it so you can change the "out" resources too (although that needs to be done with care in order to make sure it works correctly with the delivery system). I'll add it to my todo list :)

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
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 03 Dec 2013, 00:48

Re: New Dynamic Script Ideas

thanks :)
<<

Lewin

User avatar

KaM Remake Developer

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

Post 03 Dec 2013, 14:57

Re: New Dynamic Script Ideas

...aaaand it's implemented! :) As well as the script you can also alter the "out" wares from the map editor, so you can make villages seem more "alive" for example by having a few stones sitting in the stonemason's hut when the game starts.
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 03 Dec 2013, 16:18

Re: New Dynamic Script Ideas

Great! i saw it earlier in the "Changes Log" :D.
Hmm i have question , is there any way to improve FPS? The maps size will change smth? image:
Image
<<

andreus

User avatar

Sword Fighter

Posts: 343

Joined: 18 Dec 2011, 12:05

KaM Skill Level: Beginner

Website: https://github.com/andreus791/maps_feedback

Location: Russia

Post 03 Dec 2013, 16:31

Re: New Dynamic Script Ideas

Nice feature :)

@RandomLyrics: Strange that you have so low fps... Very strange :|
Image
Image

Check your graphic card, maybe you have overheating problems ;)
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 03 Dec 2013, 16:43

Re: New Dynamic Script Ideas

oh, okay, my bad, i was runing KaM on Intel Graphics xD
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 04 Dec 2013, 22:41

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
Hmm im checking if the unit is in house and always get ' -1 ' . Heres the code:
  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;
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
<<

Lewin

User avatar

KaM Remake Developer

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

Post 05 Dec 2013, 03:43

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
Hmm im checking if the unit is in house and always get ' -1 ' . Heres the code:
UnitAt does not give you units that are inside a house, since there can be many units inside a house at once (e.g. barracks, storehouse, serfs collecting bread from baker, etc.). However, UnitPosition will be the same as HousePosition when a unit is inside a house.
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
I agree, HouseTypeToOccupantType would be a more useful and generic function. HouseOccupant is confusing.

Return to “Ideas / Suggestions”

Who is online

Users browsing this forum: No registered users and 8 guests