Page 1 of 1

portal system outside of gameSDK

Posted: Fri Feb 16, 2018 9:40 am
by quasarwei
I was attempting to create a portal /teleportation system as seen in a few cryengine tutorials using the proximity trigger from gamesdk. Turns out the proximity and area trigger don't work if you're not using gamesdk. Well I found a solution/alternative way that works for what I want to do so I guess I'll share. All I use is a tagpoint and sphere area for the portal. the sphere area is simply to visualize the portal bounds.
Image In FG, I just use the EntitiesInRange node & beamentity. In my current graph, the destination position is just the same tagpoint used for the portal, obvs you'd use something else for the destination.
It isn't a perfect solution depending on ones needs. If you need to teleport as soon as you walk in, it might not be the most efficient and an area/prox trigger would be best, but in my case, it isn't necessary.

Re: portal system outside of gameSDK

Posted: Fri Feb 16, 2018 10:42 am
by Cry-Flare
Excellent ingenuity quaserwei! Thanks for sharing your experience on the subject.
We are aware of an issue with the image attachments and are investigating the issue. For now we advise people to upload images to an appropriate third party image hosting service that is suitable and link them using the img BBCode tags.

Regarding the proximity trigger, this should work AFAIK by copying the proximity trigger script from the GameSDK Scripts folder. The only thing is that the lua for this entity is designed around the player having it's own ScriptBind as it makes use of certain properties therein (Which is GameSDK based). Essentially, you can modify the lua by adding the following methods the the ProximityTrigger lua file:

Code: Select all

function ProximityTrigger.Client:OnLocalClientEnterArea()
self.insideCount=self.insideCount + 1;
self:ActivateOutput("Enter", NULL_ENTITY);
self:ActivateOutput("NrOfEntitiesInside", self.insideCount);

function ProximityTrigger.Client:OnLocalClientLeaveArea()
self.insideCount=self.insideCount - 1;
self:ActivateOutput("Leave", NULL_ENTITY);
self:ActivateOutput("NrOfEntitiesInside", self.insideCount);
This does however make certain properties (ex. "Player Only") become irrelevant, though.
This will allow the ProximityTrigger to be used outside of the GameSDK for any objects.

Thanks again

Re: portal system outside of gameSDK

Posted: Fri Feb 16, 2018 10:55 pm
by quasarwei
Many thanks Cry-Flare. i added the methods you listed and it does work now.