Page 1 of 1

Missing On-Events

PostPosted: 03 Aug 2016, 19:02
by RandomLyrics
Hi, im working on new map, and i cant figure out something..
It seems that some script methods dont working, like:
  Code:
// PLANS procedure OnPlanRoad(aIndex, X, Y: integer); begin test(aIndex); Actions.PlanRemove(aIndex, X, Y); end; procedure OnPlanField(aIndex, X, Y: integer); begin Actions.PlanRemove(aIndex, X, Y); end; procedure OnPlanWinefield(aIndex, X, Y: integer); begin Actions.PlanRemove(aIndex, X, Y); end;
i use them to prevent plans in special maps.

And still i can put some plans around.

They used to be there, they have been removed(?):
https://github.com/Kromster80/kam_remak ... ptsDynamic
im using r6720.

Re: Missing On-Events

PostPosted: 05 Aug 2016, 00:29
by Lewin
I'm not sure why they're missing from the documentation. They exist the code, you just got the names slightly wrong. Should be:
ONPLANROADPLACED
ONPLANFIELDPLACED
ONPLANWINEFIELDPLACED
ONPLANROADREMOVED
ONPLANFIELDREMOVED
ONPLANWINEFIELDREMOVED
(case doesn't matter)

You can see the full list in the code here:
https://github.com/Kromster80/kam_remak ... s.pas#L130

I might update the wiki... EDIT: Done! :)

Re: Missing On-Events

PostPosted: 06 Aug 2016, 20:00
by RandomLyrics
Oh Great!
Thank You Lewin :)