Page 1 of 1

axe produce only.

PostPosted: 30 Jun 2013, 15:56
by Skypper
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

Re: axe produce only.

PostPosted: 01 Jul 2013, 07:56
by Skypper
i there anyone that can help me?
or is it a really stupid question?
greets job

Re: axe produce only.

PostPosted: 01 Jul 2013, 09:14
by T*AnTi-V!RuZz
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.

Re: axe produce only.

PostPosted: 01 Jul 2013, 09:29
by Skypper
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....

Re: axe produce only.

PostPosted: 01 Jul 2013, 09:35
by T*AnTi-V!RuZz
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.

Re: axe produce only.

PostPosted: 01 Jul 2013, 10:34
by Bence791
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

Re: axe produce only.

PostPosted: 01 Jul 2013, 13:10
by Skypper
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 :)

Re: axe produce only.

PostPosted: 01 Jul 2013, 13:54
by Krom
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 ;)

Re: axe produce only.

PostPosted: 01 Jul 2013, 14:21
by Skypper
Ahhh.
Oke thx it works now :)