PROXIMITY and items

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

PROXIMITY and items

Post by agentorangeguy »

I'm wondering if the PROXIMITY event can be used with items just like it can be used with NPC's....

I've got an item I'm trying to script to do something when the PROXIMITY event is triggered, however it doesn't seem to be triggering. When I change it to DOUBLECLICK and run it that way, it works perfectly. I *could* just use a usecode egg and place it over said object, but I'd rather do it an easier route and have the item itself call the function when the poximity event is true. Is this possible or is the proximity event only useful for npcs?
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by Knight Captain »

No, shapes do not have PROXIMITY code.

If the item is static on the map, eggs handle this well.

If the item is not static, I'm drawing a blank on the best way to do this.

Can you share more detail of what you want to do?
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by Knight Captain »

Items like a horsecart, boat, or magic carpet could have an egg on them.
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by agentorangeguy »

Well one thing I want to do is those little volcano things, fumaroles? from U6, where they'd randomly explode and do damage to the party if they were nearby. I can get it to work via a usecode egg, but I was hoping that I could tie it with the shape itself rather than have to place an egg at every one.
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by Knight Captain »

I can see why you'd want that tied to the shape then, since there will be many of them on the map.

Maybe making an NPC that spawns but cannot move could work?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by Dominus »

An NPc like that was the first thing I thought of as well
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by agentorangeguy »

Hmmmm didn't think about making it an npc.... I'll give it a try
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by Dominus »

While I know and understand that you are not showing off much of your U6 mod, if the npc works out can you show us in a short video? I would live to see that ;)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
agentorangeguy
Posts: 565
Joined: Thu May 14, 2020 1:34 pm

Re: PROXIMITY and items

Post by agentorangeguy »

I tried to classify it as an npc monster, but it didn't seem to work right. The script wouldn't trigger and it would just randomly delete the monster/npc. Maybe I just gotta play around with it some more. I'll try to record something if i can get it to work :D
-------------------------------------------------------------------------------------
Ultima 6 Mod for Exult site: http://www.ultima6.realmofultima.com/
Locked