Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to JonnyP
14 years ago
Auto-translated
JonnyP
of course, after you change the function parameters. All errors can be easily caught with print statements. :)
Yeah, it will be a bad problem for players - not knowing which obelisk they have visited :smile13:


For now, I suggest this solution - number the obelisks (give them unique names), and in the list of tasks, indicate the number of obelisks already visited/the number remaining.
In reply to KioM
14 years ago
Auto-translated
KioM
I apologize, I misunderstood earlier (I was already sleepy :)), here's how you should do it:

Trigger (OBJECT_TOUCH_TRIGGER,'stone_'..i,'up_herolider');

function up_herolider(geroi,object)
if geroi ==Larion then
................
-MarkObjectAsVisited (object,geroi);
+MarkObjectAsVisited (object,Larion);
.................
and so on, i.e., directly reference the specific hero.
I've already tried that. :)

Added 2 minutes ago
antonag07
I suggest the following solution for now - we number the obelisks (give them unique names), and in the list of tasks, we indicate the number of obelisks already visited/the number remaining.
Hmm, it's a good idea, but it won't fit into the plot. :( This is a kind of replacement for the 'stone flowers' from my map - it's done so that each hero can use them once, and not just one - and that's it for him.
User Avatar
14 years ago
Auto-translated
"JonnyP"
yes - accordingly, it gives an error that there is no hero '1' on the map. And I also tried setting the third parameter to true - I thought maybe there was an error in the manual. The effect is achieved in principle even without it, but not for a specific hero.

This command only has two parameters, and true = 1, false = 0 always, that's why it tells you that there are no heroes with the name 1 :)

Added 1 minute ago
JonnyP
I've already tried that. :)

It worked for me; I did something similar in my map to track the number of visits to a magic source.
In reply to KioM
14 years ago
Auto-translated
KioM
This team only has two parameters, and true = 1, false = 0 is always the case, that's why it tells you that there are no heroes with the name 1 :)

Added 1 minute ago


It worked for me; I did something similar in my map to track visits to a magic source.
The same thing - the effect doesn't change :smile04:
User Avatar
14 years ago
Auto-translated
the team isn't working correctly; it sets the visited status for the entire map for the player...

P.S. I didn't properly test it on my map; I assumed everything was fine.
In reply to KioM
User Avatar
14 years ago
Auto-translated
What kind of object are we talking about? There are objects that apply to the entire player, meaning the visit count is applied to the entire player (mines, obelisks of Askh's tears, cities), and there are also objects that apply specifically to the hero (various dolmens, libraries, etc.). Or does the visit count always apply to the entire player, regardless of the object type?
In reply to Dyrman
14 years ago
Auto-translated
Dyrman
What kind of object are we talking about? There are objects that apply to the entire player, meaning the visit count is applied to the entire player (mines, obelisks of Ashen Tears, cities), and there are also objects that apply specifically to the hero (various dolmens, libraries, etc.). Or does the visit count always apply to the entire player, regardless of the object type?
Dolmen +1000 experience. Only this one will work - no alternatives are suitable.
In reply to JonnyP
User Avatar
14 years ago
Auto-translated
JonnyP
dolmen +1000 experience. Only this one will work - analogs are not suitable.
So, with a script, you set it so that it can only be visited by a specific player, but it turns out that it is visited even later by hired units?
MarkObjectAsVisited (object,geroi);

But it should work normally. And it shouldn't be turned off. Otherwise, it's just a mess.
In reply to Dyrman
14 years ago
Auto-translated
Dyrman
So, with a script, you set it so that it can only be visited by a specific player, but it turns out that it's visited even later by hired heroes?
MarkObjectAsVisited (object,geroi);
Yes, but not by hired heroes, but by the initial 2 heroes (I checked it that way).
By the way, there was another option: leave the dolmen enabled, add a trigger, and use a mod to remove the +1000 experience. Do you happen to know where this file is located and which line to change in it? (e.g., to make it give a minimum of +15 experience)?
That would be an even better option :)
In reply to JonnyP
User Avatar
14 years ago
Auto-translated
JonnyP
yes, but not hired, but initially 2 heroes (that's how I checked).
By the way, there was another option: leave the dolmen enabled, add a trigger, and use a mod to remove its +1000 experience bonus. Do you happen to know where this file is located and which line to change in it? (e.g., make it give a minimum of +15 experience)?
That would be an even better option :)
Hmm... I don't know... maybe it's even hardcoded into the executable.
And would another object not work? That is, make a copy, change its appearance to a dolmen, and specify the path?
In reply to Dyrman
14 years ago
Auto-translated
Dyrman
Hmm... I don't know... maybe it's even hardcoded into the executable.
And no other object will work? That is, can you make a copy, change the appearance to a dolmen, and specify the path?
No, it doesn't work. Well, it's already a copy with a modified model – only the dolmen's properties remain. I searched for it in RPGstats, but I don't think it's there (or something like that).
In reply to JonnyP
User Avatar
14 years ago
Auto-translated
JonnyP
No, it doesn't fit. It's already a copy with a modified model – only the properties of the dolmen remain. I searched for it on RPGstats, but I don't think it's there (or something like that).
You didn't understand me. I'm not talking about copying the dolmen (i.e., it won't have the properties of the dolmen) and changing the copy's appearance to look like a dolmen.
For example, the Crystal of Knowledge. We copy it, change its appearance. (as a side effect, it gives +1 to knowledge) and so on. Moreover, we can take away this knowledge from heroes, and this procedure is painless for the hero, unlike the procedure of taking away experience.
Or, we can find another object that is more suitable.
In reply to Dyrman
14 years ago
Auto-translated
Dyrman
He didn't understand me. I want to copy the dolmen (without its properties) and change the appearance of this copy to look like a dolmen.
For example, the Crystal of Knowledge. We copy it and change its appearance. (as a side effect, it gives +1 to knowledge, etc.). Moreover, we can take away this knowledge from heroes, and this procedure is less harmful for the hero than the procedure of taking away experience.
Or we can find another object that is more suitable.
Aha, now I understand what you mean. I haven't tried it yet. And how can I get rid of the flying message?
In reply to JonnyP
User Avatar
14 years ago
Auto-translated
JonnyP
Ah, I see what you mean. Haven't tried it yet. And how do you get rid of the flying message?
Maybe you can dig around in the object's properties (in Shared) where there are links to text files. Try deleting them; it might prevent it from flying off.
In reply to Dyrman
14 years ago
Auto-translated
Dyrman
Maybe he can dig around in the object's properties (in Shared) where there are links to text files. He can delete them; maybe it won't crash.
We'll give it a try. :smile35:

Statistics

Welcome our newest member: recijeb