You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
Welcome! You are not logged in. Please Login or Register.7 replies
Age of Kings Heaven » Forums » Scenario Design and Discussion » Deleting resources and accessing changed units
Bottom
Topic Subject:Deleting resources and accessing changed units
Bouli
Squire
posted 05-05-20 07:43 AM CT (US)         
Hi! Two questions to scenario design pros!

Short version:

1) Deleting resources via triggers?
2) Make "modify attributes" effect work on units that have a changed name?

Long version:

1) For a scenario I'm in the process of making, I would like to be able to delete resources that are created via triggers.

I've found decent workarounds (which work in my special case) for deleting resources on the ground - because they don't double up when one is created on another one. However, with fish, every time a new fish is placed on one existing before hand, they actually both stay up.

I tried modifying attributes, killing, deleting and replacing an object and nothing seems to work.

I thought of creating some ai villagers (I have ai players to spare for this), who gather these resources at an insane rate and then are deleted. However it's a lot of work and very case-specific and I'll need this done a lot, so I'm hoping for a more systematic solution.

2) I create units via triggers and change their names by "change object name" effect. Afterwards, the changes done by the "modify attribute" effect don't affect them. I've tried resetting the name to the original and it doesn't seem to work.

It seems like the Change Name creates a separate instance of this unit, perhaps with a different ID. Maybe there's a way to change the name through "modify attribute"?

Thanks in advance,
Bouli
AuthorReplies:
Julius999
Imposter
posted 05-05-20 07:50 PM CT (US)     1 / 7       
You should be able to get rid of resources like trees, gold mines, etc easily. You don't refer explicitly to the Remove Object effect - have you tried that?

I haven't checked whether DE actually has the Remove Object effect. It would be a strange thing to remove from the editor though.

1010011010
[ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
Member of Stormwind Studios
Bouli
Squire
posted 05-06-20 04:54 AM CT (US)     2 / 7       
Thanks for the response! The effect is still there and yes, I've tried it. I mistakenly called it "delete object" in my first post.

It doesn't seem to work at all on resource objects, unfortunately. I've used it on boars and deer and it works, so I don't think I'm using it wrong, especially that I spent about 20 minutes trying different combinations of settings to get it to work. Maybe it's just a bug since you say it worked in previous aoe installments?

EDIT: oh, but I want to remove resources that are placed via triggers, so I don't use the "set object" part of the effect, but "set area", maybe that doesn't work for some reason.

[This message has been edited by Bouli (edited 05-06-2020 @ 04:55 AM).]

Julius999
Imposter
posted 05-06-20 12:16 PM CT (US)     3 / 7       
I recall it being a bit temperamental. I think it will work if you use the effect to remove all 'Other' objects in the area. You can even remove cliffs that way. If you know exactly where the resources will be placed by triggers you should be able to remove them precisely, without inadvertently removing nearby things as well.

1010011010
[ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
Member of Stormwind Studios
Bouli
Squire
posted 05-08-20 08:43 AM CT (US)     4 / 7       
Ok, I tried everything I could think of, it didn't work with the "other" category being selected. I checked cliffs and it didn't work there either, so maybe it's a DE thing and they changed the mechanics of it...

The shore fish, which I'm testing it on right now, is removable if it's created in the editor and manually removed with "Set Object" in the effect. I couldn't delete it with any "Set Area" settings I could think of.

My current theory is that for some reason shore fish and resources are no longer gaia units and you can't delete them, because you have to specify a player whose units you are deleting.

And fortunately yeah, I know exactly where the resources are going to be, so inadvertent removals are not an issue I just need the removals to happen
Julius999
Imposter
posted 05-14-20 07:17 PM CT (US)     5 / 7       
I've installed DE on this computer and tested this. Unfortunately, it seems that you are right. In DE, removing Gaia objects in an area doesn't seem to work properly. I am sure that you could do this in previous versions of AoK, or at least vanilla and UserPatch.

HockeySam, if you read this perhaps you can pass it on to the team.

1010011010
[ All_That_Glitters | Pretty_Town_Contest | Other_AoK_Designs | AoE_Designs ]
Member of Stormwind Studios

[This message has been edited by Julius999 (edited 05-14-2020 @ 07:18 PM).]

HockeySam18
Dúnadan
posted 05-15-20 01:06 AM CT (US)     6 / 7       
Done!

~ Forgotten Empires ~

Storm on the Steppe | Galderton Hill RP | Proud member of Stormwind Studios

"Deyr fé, deyja frændr, deyr sjálfr it sama; ek veit einn at aldri deyr, dómr um dauðan hvern." - Hávamál 77.
Mr Wednesday
Cavalier
(id: matty12345)
posted 05-15-20 12:44 PM CT (US)     7 / 7       
Can you use teleport as a workaround?

"And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames