Current time: 23.11.2024, 03:15 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Ваши вопросы по ERM-скриптам
Author Message
M.A.K.C. Offline

Posts: 472
Post: #3991

не подскажите, есть ли ограничение на количество существ которых можно нанимать в нейтральных жилищам? (сколько типов существ для найма можно привязать к жилищу?)


Все свежие обновления я выкладываю на своем сайте здесь.
09.05.2016 00:10
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16657
Post: #3992

Quote:Then type 26 (event) is not recognized by erm
!!OBx/y/z:T does not work?
09.05.2016 00:19
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #3993

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
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3994

(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


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
09.05.2016 14:50
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #3995

This is excellent, thanks. But I have no idea how to achieve my plan. 105

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.
09.05.2016 23:36
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3996

I don't quite understand how you change graphics in the first place. Can I see your code on it?


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
09.05.2016 23:50
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #3997

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.
10.05.2016 00:06
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #3998

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.

Image: DDvrIy.png

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?
(This post was last modified: 10.05.2016 16:37 by Valery.)
10.05.2016 16:28
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #3999

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.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
10.05.2016 18:29
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4000

Try !!SN:E7416831/1/x/y/l;


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
10.05.2016 18:44
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4001

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
(This post was last modified: 10.05.2016 18:49 by Valery.)
10.05.2016 18:48
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4002

(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.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
10.05.2016 18:51
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4003

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.
(This post was last modified: 10.05.2016 19:17 by Valery.)
10.05.2016 19:01
Find all posts by this user Quote this message in a reply
Valery Offline

Posts: 2196
Post: #4004

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.
(This post was last modified: 10.05.2016 19:26 by Valery.)
10.05.2016 19:21
Find all posts by this user Quote this message in a reply
gamecreator Offline

Posts: 7107
Post: #4005

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.


When all gods have burnt to ashes in eternity of sorrow,
Demons gonna tear your soul because there is no tomorrow.
10.05.2016 20:16
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2024 MyBB Group