не подскажите, есть ли ограничение на количество существ которых можно нанимать в нейтральных жилищам? (сколько типов существ для найма можно привязать к жилищу?)
Quote:Then type 26 (event) is not recognized by erm
!!OBx/y/z:T does not work?
yes, it returns 26 but !?OB26 does not work, so I have no way to know when hero activates an event.
(09.05.2016 00:45)Valery Wrote: [ -> ]yes, it returns 26 but !?OB26 does not work, so I have no way to know when hero activates an event.
Untested, but should work:
(09.05.2016 00:10)M.A.K.C. Wrote: [ -> ]не подскажите, есть ли ограничение на количество существ которых можно нанимать в нейтральных жилищам? (сколько типов существ для найма можно привязать к жилищу?)
4
This is excellent, thanks. But I have no idea how to achieve my plan.
a) loop events on map -works
b) Place some graphic to display them -works
c) after hero triggers an event -works now,
d) delete the graphic -doesn't work, as not yellow trigger graphics are not recognized as objects. I tried to give to square yellow trigger just before deleting, not working neither.
I don't quite understand how you change graphics in the first place. Can I see your code on it?
First I set to "place sign which looks like ID = x". But on maps with too many events this crashed the game as it seems there is a limit to sign texts.
So then I just changed the graphics of mithril mine to event graphic and now I just !!UN:Iv1/v2/v3/63/27;
It will place this event graphics and surprisingly, probably because there is an event under, the square remains passable and no yellow trigger.
But now no idea how to delete this graphic once event under is done.
Here is my last attempt. Press F3 (or any key, you parameter in ini. file) to display/hide all events. Also after the hero activates event, it will be deleted from display list.
Still problems:
a) UN:O does not recognize objects placed on events, so I had to create 64x64 graphic, and place it on the square south from event. (v2+1) then delete yellow square and make it passable. This way I can delete it later by specifying that bottom square.
b) But if on this square there is one hero, game will crash, so I had to check if any hero there then exit, so in this particular condition, delete script will be ignored
c) If two events are adjacent perpendicular (v2 and v2+1), the bottom will be ignored from delete list (because the problem aforementioned).
Any better ideas on how I could achieve such thing?
I can think of several reasons why it can't be removed from on top of the event, but to investigate it I would have to recreate your mod from nothing.
Try !!SN:E7416831/1/x/y/l;
This code, when placing on top of event -because I have to use two defs accordingly?
Here is the mithril mine (63/27) which replaces on the top (one square)
one square
(10.05.2016 18:48)Valery Wrote: [ -> ]This code, when placing on top of event -because I have to use two defs accordingly?
No, it's for removing. Yes, because two defs.
ok, so your code works perfectly for removing the "on top of event" graphic after visiting the event
!$OB26&1000;
!!SN:E7416831/1/v998/v999/v1000; works
But I get "error message UN:U no more objects" when I loop for removing all of them with F3 key
!?FU7800700;
!!UN:Ux1/-1/-1/1; event in v1/v2/v3
!!SN:E7416831/1/v1/v2/v3; this error
@Edit: tried to debug error and UN:U error occurs somewhere at middle of loop, no matter how many events are.
ok, it worked as soon as I replaced v1-v3 with v6-v8, looks like the SN command corrupts those vars. Going to test with more events.
Now it crashes when I press twice F3 (display ON/OFF). It removes the events graphics but it crashes as soon as I try to display them again.
This works on !?PI, but once I use the commands !!SN:E on all events once, then it crashes if redone.
Does the game crash silently or is there any errors?
I noticed your object is 2x1 squares. The function I supplied is used by ERM to place and remove logs in UN:D. Try making the object into 1x1. And make sure it doesn't have any yellow squares.