Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sat May 25, 2024 5:21 am
All times are UTC + 0
Check if specific unit is standing on a cell
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Fri Sep 22, 2023 4:03 pm    Post subject:  Check if specific unit is standing on a cell
Subject description: Similar to engineer "working" on a machine on missions
Reply with quote  Mark this post and the followings unread

I'm trying to get a technician, once mindcontrolled, move to a construction site and build a Grinder. I've already tried Enter By... but that's house specific so Yuri Clones can activate the trigger. I think it's something similar to Engineer "fixing" machines on missions.

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Fri Sep 22, 2023 6:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

as in you want the engineer to go to a certain place, and then dissapear as a building appears?

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sat Sep 23, 2023 3:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Both actually. But originally I was going to make the technician go to a tent and the tent disappears along with the technician but that got complicated since selling the tent just eject the technician outside.

That seemed simpler since I could just detect the technician going to a building but detecting specific units in a cell is a lot useful to know.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sat Sep 23, 2023 9:40 am    Post subject: Reply with quote  Mark this post and the followings unread

You can use a celltag & then attach an entered by trigger to that tag. Then when a unit moves over that cell the trigger will fire.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sat Sep 23, 2023 10:34 am    Post subject: Reply with quote  Mark this post and the followings unread

That's what I did already. But I need the technician to specifically be the one to activate it but everything that the house specified owned can activate it including the Yuri Clones. That's the problem I have on another mission where I need only the units I need to save need to touch the cell but it could also be activated by any unit I have which is not good for the "mission complete".



Mission_2.png
 Description:
 Filesize:  594.11 KB
 Viewed:  1402 Time(s)

Mission_2.png



Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sat Sep 23, 2023 11:12 am    Post subject: Reply with quote  Mark this post and the followings unread

If this is for the AI then you just need to design the AI & map so they wont go near the celltag until you want them too.

If this is for player controlled units then it's a lot more complicated as they have freedom of movement. The best option would probably be the tent idea you originally had. Make the technician an engineer & the tent captureable, then add a trigger that fires when it captures the tent.

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sat Sep 23, 2023 1:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Giving the player engineer is gonna be a problem. Also, I need specific units to be detected since that is also a problem my first mission where specific units needed to be saved and not just reach the goal by any unit.

I remember a mission in Red Resurrection where you need to put the engineers near a machine to deactivate it. That is pretty much what I needed for both of my mission currently.

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Sat Sep 23, 2023 1:54 pm    Post subject: Reply with quote  Mark this post and the followings unread

You could also make a separate house just for the specific units, then the triggers will only fire then those units reach the target. That wont work if you want the unit to be mind controlled by Yuri tho...

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Sat Sep 23, 2023 3:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

you could use the trigger event 'moves near waypoint', which is attached to the specific unit/team that you want to cause the trigger to fire.

i suggest doing this:
attach the 'move near' trigger to the engineer and also make it recruitable
make a recruiter=yes team consisting of just the engineer scripted to move to the tent, set a local variable, and delete itself
make the trigger that has the 'move near' event use action 4 to recruit the engineer into said team
make a trigger with the event being the local variable and the action being to remove the tent, build grinder

so when the engineer gets near the tent waypoint, it will automatically get recruited into a team and go to the tent and disappear giving
the image of entering the tent, in the process it will fire another trigger making the tent get destroyed and the grinder get created.

one note is that if the engineer is given another order after it gets recruited, the script will break. you can lock input, change engineer
house, or make the recruitment trigger repeat with a small time delay until the second trigger fires to solve this.

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sat Sep 23, 2023 5:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

I see... So there's no way to check specific units. But how do you delete the engineer? Did you mean go inside the tent, commit suicide or destroy attached object? Is there a way to delete a unit, like just get removed from the game without being killed or dying?

If you meant the engineer capturing the tent then that is what I was trying to avoid. My original plan was to make the technician garrison the building and that gets detected and trigger to destroy the tent and build the Grinder but the technician just comes back out.

The reason why it was a technician in the first place was because I didn't want to use a unit that can capture buildings.

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Sat Sep 23, 2023 6:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

the only way i can think of to check for specific units is the 'comes near waypoint' trigger attached to the unit. since you still want it to look like its going in the tent, you can
use the recruitment and scripting shenanigans i described to force the unit into a teamtype with a script that makes it look like it enters the tent and subsequently create your grinder.

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Sep 23, 2023 6:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

I feel like a "change house" action could be handy in there...

Also in FA2 you should place walls using the "other overlay" sub-list under overlays instead of placing the buildings, you will get a fairly accurate representation of the final result then. Of course if you want to add damage to any sections, you'll have to do that manually selecting the frame of the overlay from the dropdown in the terrain pane.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sat Sep 23, 2023 7:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:
with a script that makes it look like it enters the tent and subsequently create your grinder.

Yeah, but what script exactly that will make it look like it enters the tent? That was what I was wondering in my last reply. Is it 31 Suicide?

G-E wrote:
I feel like a "change house" action could be handy in there...

Also in FA2 you should place walls using the "other overlay" sub-list under overlays instead of placing the buildings, you will get a fairly accurate representation of the final result then. Of course if you want to add damage to any sections, you'll have to do that manually selecting the frame of the overlay from the dropdown in the terrain pane.

Would "Change House" keep the mindcontrol?

Also for the walls, I was planning on adding colored walls and I did and there was a problem. I got it from here: https://ppmforums.com/topic-33307/remapable-alliedsoviet-yuri-walls-ares-required/



Mission_2 (2).png
 Description:
 Filesize:  693.26 KB
 Viewed:  1290 Time(s)

Mission_2 (2).png



Mission_2 (1).png
 Description:
 Filesize:  524.42 KB
 Viewed:  1290 Time(s)

Mission_2 (1).png



Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Sat Sep 23, 2023 7:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

you can use 'delete team members' script action and it will just delete the unit right in front of the tent, basically making it look like it went inside.

using change house on the first script action of the team will prevent the player from moving the unit after the script starts and breaking
the script, but i found from a previous map i did that if the player is using waypoints on the unit at the moment of recruitment, it will
recruit but also break the script so i suggest instead adding a 2nd event 'elapsed time' with 10 or so to the event section of that
'comes near waypoint' trigger, and setting the trigger to repeat. then making the second trigger, the one that creates the grinder, disable
the first trigger. this way it will keep forcing the team to try and 'enter' the tent until it works even if something goes wrong.

_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sat Sep 23, 2023 7:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ah, that is useful! I thought that that would do something else, like only remove they're teamtype as in they will no longer be a part of any team. Did not know it could do something like that!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [15 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2439s ][ Queries: 16 (0.0649s) ][ Debug on ]