Forum breadcrumbs - You are here:ForumCommunity Boards: Hammer and ModdingMimic?
Please or Register to create posts and topics.

Mimic?

Page 1 of 2Next

I had an idea for a Portal map, but I wasn't sure if it the engine allowed it. So I installed the Source SDK and followed a couple of basic tutorials, and right now I don't even think I can achieve my idea without creating some crazy mod.

Here is the basic idea that I wanted to implement. At first glance it would look as if a mirror is present in the room, but the reflexion is slightly different, and switches activated in the reflexion of the mirror would open up doors on the other side. The trick would be to have a glass instead of a mirror with a 2nd Chell that would mimic everything the player does.

This idea sounded simple, but I stumbled on a lot of hurdles:
- I cannot find a Chell NPC entity. I could use a different NPC, but it would look awkward.
- Interaction between entities appear to be impossible beyond target recognition and preprogrammed events. What I need is to copy-paste some entities attributes values, and sometimes multiply them by -1.
- Even if I abandon the mirror idea and only use a mimic in an isolated room, I'm still unable to set the player as a parent. Even if I am allowed to do so, NPC entities do not seem to be able to go through portals.
- I have no idea how to make my 2nd set of portals appear where I want given the restrictions. I don't even think a 2nd portal gun can fire portals not linked to the player's generated portals.

Since I'm still not familiar with the development tools, can somebody confirm that it indeed impossible to overcome these hurdles without installing Visual Studio and having to create a relatively complex mod?

I would say that it's impossible, but hey, don't believe me.

That sounds pretty impossible. It would require extensive custom coding and unfortunately, the source code for the Portal client DLLs is not publicly available, like it is for other Source games. So even if you were familiar with Source engine coding, you can't make the necessary changes to Portal.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

So even a mod wouldn't work? That's kinda disappointing for something that would normally be so simple to program.

I guess that I have to completely remove the actor that would mimic the moves as a visual indicator, and forget about controlling a 2nd set of portals based on the position of the player's portals. :(

Mmmm... :idea:

Actually, I could still do it, but the feeling would be completely different. For example, if in my 1st room I put a door and a box, and behind the glass a button and a door, I think people would understand the concept.

I think there is a way to make NPC's go through portals, remember seeing a tutorial to make Gman walk though one, don't know how well it works though, never tried it.

http://www.youtube.com/watch?v=k6JUUOH9O78 shows that it is possible, and the uploader of the video credits this site for the info about it, I just can't figure out where. Hope that helps a bit.

Enrichment Center 4XE3 Progress:
Planned:15(+/-)
Drawn up: 9/15
Maps Done: 2/15
Stormrain wrote:
I think there is a way to make NPC's go through portals, remember seeing a tutorial to make Gman walk though one

It can only do prescripted things, so it will be the same every time.
There is no chell npc because she wasn't originally intended as an NPC.
I've also wanted to figure out if you can parent things to the player, so If anyone knows, can they answer please.

hanging_rope wrote:
I've also wanted to figure out if you can parent things to the player, so If anyone knows, can they answer please.

You can, but when the player looks up or down, the parented object doesn't go with it. (Perhaps you have to do SetParentAttachment as well, but I haven't tried that.)
Because you can't set a targetname on the player, you have to use a trigger that sends the objects to be attached a SetParent signal with !activator as the target. (!Activator being the player who just walked through the trigger.)

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
HMW wrote:
Because you can't set a targetname on the player, you have to use a trigger that sends the objects to be attached a SetParent signal with !activator as the target. (!Activator being the player who just walked through the trigger.)

This could give interesting results! Thanks for the tip HMW! :D

SmashManiac wrote:
This idea sounded simple, but I stumbled on a lot of hurdles:
- I cannot find a Chell NPC entity. I could use a different NPC, but it would look awkward.
- Interaction between entities appear to be impossible beyond target recognition and preprogrammed events. What I need is to copy-paste some entities attributes values, and sometimes multiply them by -1.
- Even if I abandon the mirror idea and only use a mimic in an isolated room, I'm still unable to set the player as a parent. Even if I am allowed to do so, NPC entities do not seem to be able to go through portals.
- I have no idea how to make my 2nd set of portals appear where I want given the restrictions. I don't even think a 2nd portal gun can fire portals not linked to the player's generated portals.

There is no NPC for Chell. She exists only as a third person model for the player, that's it.

Explain more about what you mean/what you're trying to do. Maths are indeed possible but the more complicated you get the more entities are involved.

You can use !player as the targetname for various I/O to specify the player. There's a few more of these special targets but I won't go into them and confuse you. Also, NPCs don't go through portals. Check the wiki, there's a mega hack to make them do it but they kinda suck at it and freak out a little.

You can create pre-placed portals with multiple pairs, using the Pair ID in the prop_portal I believe. I don't think you can make the Portalgun create different paired portals.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
msleeper wrote:
You can use !player as the targetname for various I/O to specify the player.

D'OH!! I totally forgot about that! Sorry :oops:
Here's the full list of special names, in case anyone is interested.

msleeper wrote:
You can create pre-placed portals with multiple pairs, using the Pair ID in the prop_portal I believe. I don't think you can make the Portalgun create different paired portals.

That's right. The portal gun always produces portals with ID 0.

Also, watch out for putting to many portals close together and/or able to see each other. This is a very effective frame rate killer.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Page 1 of 2Next