Map Database  •  FAQ  •  RSS  •  Login

axe produce only.

<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 30 Jun 2013, 15:56

axe produce only.

Hi
i want to let a AI make only Handaxe's but how can i do that?
i have found this HouseWeaponsOrdered 19 20 but how can i use it?
Greets Job
Greets Skypper (Totally Insane)

- Beginning map maker -
<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 01 Jul 2013, 07:56

Re: axe produce only.

i there anyone that can help me?
or is it a really stupid question?
greets job
Greets Skypper (Totally Insane)

- Beginning map maker -
<<

T*AnTi-V!RuZz

User avatar

Former Site Admin

Posts: 1826

Joined: 03 Jan 2007, 23:00

KaM Skill Level: Fair

Website: http://www.knightsandmerchants.net

Location: The Netherlands

Post 01 Jul 2013, 09:14

Re: axe produce only.

It's not even been 24 hours since your first post. Have some patience please.
It's not like we're all here 24/7. I'm sure someone is able to answer your post.
<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 01 Jul 2013, 09:29

Re: axe produce only.

over 30 people saw my post and no one said something.
and i thought it was a easy question :(
that only needed a short answer.
but it is properly not....
Greets Skypper (Totally Insane)

- Beginning map maker -
<<

T*AnTi-V!RuZz

User avatar

Former Site Admin

Posts: 1826

Joined: 03 Jan 2007, 23:00

KaM Skill Level: Fair

Website: http://www.knightsandmerchants.net

Location: The Netherlands

Post 01 Jul 2013, 09:35

Re: axe produce only.

over 30 people saw my post and no one said something.
and i thought it was a easy question :(
that only needed a short answer.
but it is properly not....
Not everyone is an experienced mission creator.
<<

Bence791

Knight

Posts: 618

Joined: 20 Jul 2012, 20:25

KaM Skill Level: Beginner

Location: Hungary

Post 01 Jul 2013, 10:34

Re: axe produce only.

Well, I'm a really beginner scripter, but I think it could work (Lewin/Krom/sado/Siegfried/Tef could help you if it doesn't work):
  Code:
procedure OnTick; begin Actions.HouseWeaponsOrderSet(aHouseID, 22, 0) and //it should set the order of Lances to 0 Actions.HouseWeaponsOrderSet(aHouseID, 24, 0); //it should set the order of Bows to 0 end;
aHouseID should be replaced by a variable(s) that you assign your weapons workshop(s) to, like this:
  Code:
var WeaponsWorkshop01: Integer; procedure OnMissionStart; begin WeaponsWorkshop01 := States.HouseAt(X, Y); //X should be replaced by the X coordinate of the house, Y by the Y coordinate end;
With this piece of script, you will tell the Remake that you want a Weapons Workshop (or any other building anyway xD) to be assigned to your variable, which exists at (X, Y) at the start of the mission.

If you have more workshops, then you can make more variables for them ofc, easiest this way (Important not to write them between a "procedure <something>" and "end", because you will get a local variable which can only be used in that exact procedure, easiest to write your global [which can be used in any procedure] variables at the beginning of your script, so you won't make a mistake for sure):
  Code:
var WeaponsWorkshop01, WeaponsWorkshop02, WeaponsWorkshop03: Integer; etc
Obviously you will need to do the assign for all, separatedly.
Hope I could help and that it works :D
The Kamper is always taking my colour!

<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 01 Jul 2013, 13:10

Re: axe produce only.

i am way more beginner than you are, but thx.

i have now this:
  Code:
var WeaponsWorkshop01: Integer; procedure OnMissionStart; begin WeaponsWorkshop01 := States.HouseAt(20, 35); end; procedure OnTick; begin Actions.HouseWeaponsOrderSet(WeaponsWorkshop01, 22, 0) and Actions.HouseWeaponsOrderSet(WeaponsWorkshop01, 24, 0[b]);[/b] end;
But it don't work... He said Type mismatch [11:55] that is between the bold marked code.

Is there something wrong white it?
but thx for your help :)
Greets Skypper (Totally Insane)

- Beginning map maker -
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 01 Jul 2013, 13:54

Re: axe produce only.

It should be like so:
  Code:
var WeaponsWorkshop01: Integer; procedure OnMissionStart; begin WeaponsWorkshop01 := States.HouseAt(20, 35); end; procedure OnTick; begin Actions.HouseWeaponsOrderSet(WeaponsWorkshop01, 22, 0); Actions.HouseWeaponsOrderSet(WeaponsWorkshop01, 24, 0); end;
"and" is a logical operator that can't be applied inbetween procedure calls ;)
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
<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 01 Jul 2013, 14:21

Re: axe produce only.

Ahhh.
Oke thx it works now :)
Greets Skypper (Totally Insane)

- Beginning map maker -

Return to “General / Questions”

Who is online

Users browsing this forum: No registered users and 8 guests