Map Database  •  FAQ  •  RSS  •  Login

Gnarf

<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 16 Jan 2014, 21:13

Gnarf

So. Here is a new topic for you!
For the next fow times i will ask in this topic, so i don´t need to open 4-5-6 new one.

The first questing is very easy, i hope. How can i spawn people (serfs with goods) into the map. they shall come maybe every 10 seconds, for 2 minutes and 30 seconds, bring the goods in the store and then went away were they came from (go tho the "spawnpoint" and then be deleted).

I hope someone can help. It is for a mission i´ll make (If the informations are not enough i will explain more).
Thanks in advance
GR
MaxDeus
It is not to be against something, it is to be for something!!!
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 16 Jan 2014, 22:18

Re: Gnarf

I'm sorry but according to my knowledge it's impossible. The closest thing to what you're asking for is detecting what serf is carrying (States.UnitCarry), or adding a ware to the storehouse with a script (Actions.HouseAddWaresTo). The only idea I have, that could solve your problem, would be to spawn a storehouse with 1 item inside and a serf, then quickly delete the storehouse right after we detect that the serf is carrying the ware to the other store. Please give us some more details then, maybe we can think of some trick to use.
<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 17 Jan 2014, 08:24

Re: Gnarf

Tonight i had another idea how to implement this. Maybe we could make a part of the map black (fog, or however it will be called). There is a store from where some serf transport the objects to the other store.
This is it now (pic 1 is normal).
Lagerhausproblem 1.gif
You see the store, some serfs can take wares from there. But in fact i want to have it like this: It´s a outpost from some country and the food is comming from the inland. So the serfs shall take some food and bring it in the other store.
To make it realise, i thought of extend the map on the left side a little bit, so that i can put a store there. This should look like this (of course with good edges, pic 2).
Lagerhausproblem 2.gif
Maybe it is the only way to solve this problem. Can this be implemented?
GR
MaxDeus
You do not have the required permissions to view the files attached to this post.
It is not to be against something, it is to be for something!!!
<<

pawel95

Castle Guard Swordsman

Posts: 1912

Joined: 03 Oct 2008, 22:00

KaM Skill Level: Skilled

Location: "Pawel95" on Youtube.com

Post 17 Jan 2014, 11:25

Re: Gnarf

AHHHHH :D :D

You mean, you want sth like an "invisible spawn point" (like in roller coaster ty: http://www.gameclassification.com/files ... coon-2.jpg ) where an invisible storehouse is and serfs disapears when they move in that area and appear again, when they come back with the ware? XD
I don´t think that something like this is implementable yet.

However I have an other idea. Do you have played "The Meize" from Andreus? He has "teleporters" there! maybe you could place a storehosue just behind some hills, far away, so the player can´t see it, and those serfs will go then into this "hole" for example and come back with wares?! :P
<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 17 Jan 2014, 11:44

Re: Gnarf

The meize? Sry, never done yet. And you´re right. Like in rollercoaster Tycoon, left side of the screen only.
The problem is, that the storehouse is from the allies, not enemy, so you see were it is.
It is not to be against something, it is to be for something!!!
<<

pawel95

Castle Guard Swordsman

Posts: 1912

Joined: 03 Oct 2008, 22:00

KaM Skill Level: Skilled

Location: "Pawel95" on Youtube.com

Post 17 Jan 2014, 12:15

Re: Gnarf

The problem is, that the storehouse is from the allies, not enemy, so you see were it is.
I am not programming much with the Remake, so I can only write "what I guess" :D But I guess to remember that at sado´s conquest map, he also did it somehow, to make a fog of a certain area and it will be only revealed when YOU go there, not your ally.
<<

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 17 Jan 2014, 13:50

Re: Gnarf

You can't spawn a serf in the middle of his delivering task. The way our code is written the delivery requires a source and a destination, so it's not simple for us to make a script command that places a serf in the middle of this task. It's not impossible for us to implement but given that it has only a few limited useful cases I don't think we'll implement it soon.
The problem is, that the storehouse is from the allies, not enemy, so you see were it is.
You can disable sharing fog between allied players with the script then cover the area :) Then the storehouse can remain hidden.
<<

dicsoupcan

Moorbach's Guard

Posts: 1314

Joined: 12 Feb 2012, 21:36

KaM Skill Level: Fair

Post 17 Jan 2014, 13:56

Re: Gnarf

You can't spawn a serf in the middle of his delivering task. The way our code is written the delivery requires a source and a destination, so it's not simple for us to make a script command that places a serf in the middle of this task. It's not impossible for us to implement but given that it has only a few limited useful cases I don't think we'll implement it soon.
The problem is, that the storehouse is from the allies, not enemy, so you see were it is.
You can disable sharing fog between allied players with the script then cover the area :) Then the storehouse can remain hidden.
actually i had a similiar idea to fix this in a future mission i had planned (beware shd, you arenot nearly doneyet :D). just hide a storehouse somewhere with enoughs serfs and goods to carry the needed resources. after they took the goods just silent kill your storehosue(well...you know...that command that make it vanish without the destruction whererubble is left).
You have enemies? Good. That means you've stood up for something, sometime in your life. ~ Winston Churchill
<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 17 Jan 2014, 14:00

Re: Gnarf

but if it´s not possible jet, can we make it like this: 4 serfs are at the store B, take some sausages for example, walk to point X, "warp" to point Y (with sausages), give the sausage to the tavern or the store A?!
The problem might be to give them the task, even if they don´t have a normal way to the tavern/store A.
It is not to be against something, it is to be for something!!!
<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 17 Jan 2014, 17:23

Re: Gnarf

And one more question. Is it possible to make a command like this:

If Player 1 sees/uncovers Point (x/y), show message X?!

GR
MaxDeus
It is not to be against something, it is to be for something!!!
<<

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 18 Jan 2014, 00:07

Re: Gnarf

but if it´s not possible jet, can we make it like this: 4 serfs are at the store B, take some sausages for example, walk to point X, "warp" to point Y (with sausages), give the sausage to the tavern or the store A?!
The problem might be to give them the task, even if they don´t have a normal way to the tavern/store A.
There is no script command for teleporting units. The way other scripts achieve it is by silently killing the unit and respawning it somewhere else, but obviously this means the delivery task won't be happening any more since it's actually a new unit not the old one.

The problem with actual teleporting is that lots of our code relies on that not happening. For example the walking action keeps track of where the unit is and where it is going. If the unit suddenly teleported somewhere else it would make it crash. Restarting the walking action is not easy because that depends on the unit's task, he could be in the middle of delivering, or pushed away by another unit, or walking to build a road.... I don't think teleporting will be implemented any time soon (if it is it will almost certainly only be for idle units).

There is also no way to get a serf to deliver from a storehouse to another storehouse. Maybe we do need a command to give a serf a specific delivery or even a delivery without a source (magically giving him the resource). If a few people are interested in this I can look into it, but probably not for this next release.
And one more question. Is it possible to make a command like this:

If Player 1 sees/uncovers Point (x/y), show message X?!
Something like this:
  Code:
var AreaRevealed: Boolean; procedure OnMissionStart; begin AreaRevealed := False; end; procedure OnTick; begin if States.FogRevealed(0, 56, 97) and not AreaRevealed then begin Actions.ShowMessage("Player 0 revealed location 56, 97!"); AreaRevealed := True; end; end;
<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 18 Jan 2014, 09:11

Re: Gnarf

Okay, thanks. I will try it like this. I will change a little bit of the map so that it is possible.
Next question will come, be warned :)
GR
MaxDeus
It is not to be against something, it is to be for something!!!
<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 19 Jan 2014, 18:27

Re: Gnarf

He does not know the command: ShowMessage.
First mistake was to forget the var...., then i added it, now he has got the mistake: warnig in script error, 12:13 unknown identifier 'SHOWMESSAGE'
And can we make it like this: Show message 2 (-> he shall take it from the .ger or .eng..., so that everybody will understand the message?!)

GR
MaxDeus

Update: He made it, command was: Showmsg
It is not to be against something, it is to be for something!!!
<<

MaxDeus

User avatar

Warrior

Posts: 116

Joined: 08 Jan 2014, 09:05

KaM Skill Level: Fair

Location: Germany

Post 20 Jan 2014, 10:31

Re: Gnarf

So. Next question is comming:
Can i give a player the command: if house A does not find coal anymore, build another house B at P(x/y)?
It is not to be against something, it is to be for something!!!
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 20 Jan 2014, 10:40

Re: Gnarf

@MaxDeus:

You can use HouseCanReachResources (added in r5993) to see if house can reach resources and if it can't - build another house at B.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 16 guests