Forums Gallery LOGIN |REGISTER

Community Archive is read-only - Here you can view content recorded up until February 2017. To join the latest discussions visit our new forums


Issue with Flow Graph nodes

Gameplay Setup, SP/MP Logic, Audio Setup, AI Logic, Entity Usage, etc.


 

User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Issue with Flow Graph nodes

Postby christopheduron » 02.12.2014, 19:27

Image
Image

I've been trying to make a bunch of stepping stones you have jump onto in order to cross a river. The stepping stones can move up and down in the water. What i want to achieve is that 2 random stones out of 6 do this animation constantly, but i can't get it to work even though i'm pretty sure i'm doing it right.

As you can see in the first picture i used 'Logic:RandomTrigger' so that there is exactly one RANDOM stone moving up and down. While this is working perfectly it's not what i'm looking for.

Since i want more than one stone to be moving at the same time i've tried to use 'Logic:RandomSelect. If i understand this node correctly if i enter the values of 'OutMin' and 'OutMax' both to 2, there should be 2 stones MINIMUM and MAXIMUM moving at the same time, so constantly 2 basically.

This isn't working as intended. When the game starts 2 stones move at the same time, then more than 2 will be moving and finally all 6 will constantly be moving. It feels as if whenever the values for the 'Logic:RandomSelect' node loop back after a complete cycle, instead of only activating the random once, it activates it twice since there were 2 stones returning an output. The next loop will have 4 returning outputs and so on.

As far as i know, the 'Logic:RandomSelect' should only be getting 1 input after every cycle since it's coming from the 'Logic:Any' node. Maybe this last node is messing it up somehow still?

Please leave a reply if you need more information about my problem. Thanks!
User avatar hhildebr
Regular Dev
Regular Dev
 
Posts: 437
Member since: 28.08.2012, 23:09
Location: Berlin, Germany
Likes: 126

Re: Issue with Flow Graph nodes

Postby hhildebr » 02.12.2014, 19:38

If I see correctly, you're wiring the Finish port to the Logic:Any node, and then that to the RandomSelect? That would mean for every stone finishing you get two new ones starting up. So first you have two, when those are finished you get four etc.
User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Re: Issue with Flow Graph nodes

Postby christopheduron » 02.12.2014, 20:01

Well in the picture above the Logic:RandomSelect has an input, but no output so i don't think that should be doing anything right? How exactly would it be that one stone finishing starts up two exactly?

If i understand correctly: Game starts -> triggers ANY node -> chooses a random rock to move out of 6 (even though it always starts with rock 6) -> the rock finishes the second movement -> the FINISH output trigger the ANY node -> everything starts over again

Am i more or less correct?

(To make things clear, my goal is to use the 'Logic:RandomSelect' node instead of the 'Logic:RandomTrigger' so that i can move more than rock at the same time. It's currently set up to the 'Logic:RandomTrigger to test if it would be working with that, which it does, but it only moves 1 random rock at the same time. Just imagine the RandomSelect node being in the place of the RandomTrigger node which for some reason moves all the rocks at the same time when it goes on for long enough.)

Sorry for the long text, i can't think of a way to make it shorter :p.
User avatar hhildebr
Regular Dev
Regular Dev
 
Posts: 437
Member since: 28.08.2012, 23:09
Location: Berlin, Germany
Likes: 126

Re: Issue with Flow Graph nodes

Postby hhildebr » 02.12.2014, 20:15

Well, I read your OP that the first screenshot shows moving one stone using RandomTrigger, which worked fine. I was guessing that you them replaced RandomTrigger by RandomSele t, which would give the wrong behavior. Maybe show us a screenshot of the flwgraph where things go wrong.
User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Re: Issue with Flow Graph nodes

Postby christopheduron » 02.12.2014, 20:23

Ok; i'm currently re-installing cryengine cause i had some issues. Please check back later!
User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Re: Issue with Flow Graph nodes

Postby christopheduron » 02.12.2014, 20:29

Image

This should be it. When running this it starts off nicely with only 2 rocks moving. Then 2 more rocks, then it was 3, then, 4, then 5 and eventually all 6 kept going.

outMIN and outMAX are both set to 2. Shouldn't this exactly make only 2 random rocks move every cycle?
User avatar hhildebr
Regular Dev
Regular Dev
 
Posts: 437
Member since: 28.08.2012, 23:09
Location: Berlin, Germany
Likes: 126

Re: Issue with Flow Graph nodes

Postby hhildebr » 02.12.2014, 20:39

Yes, that's what I meant. You start off with two stones moving. When any of them finishes, the Logic:Any fires, which sets off RandomSelect to select two new stones. But unless your first two stones trigger the Logic:Any node at exactly the same time, this will be two triggers of Logic:Any, so you set off 4 stones, and finally all six of them.
User avatar Shinanigans
Has seen it all
Has seen it all
 
Posts: 11862
Images: 82
Member since: 09.01.2008, 01:11
Location: Straya
Likes: 1062

Re: Issue with Flow Graph nodes

Postby Shinanigans » 02.12.2014, 20:41

/moved - That was the CryENGINE 2 forum

Hover the mouse over the ports to reveal port-specific information.

Min 1 / Max 1 means it will always fire 1 randomly selected output port when triggered.
Min 1 / Max 3 means it will fire 1, 2 or 3 randomly selected output ports when triggered.
Min 6 / Max 6 means it will always fire 6 randomly selected output ports when triggered.

You should take a look at the VicinityDependentObjectMover entity: http://docs.cryengine.com/display/SDKDO ... bjectMover

Also, use the debugger: http://docs.cryengine.com/display/SDKDO ... h+Debugger
User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Re: Issue with Flow Graph nodes

Postby christopheduron » 02.12.2014, 20:45

I will, but first, you explained the port specific information exactly how I interpretted it in the first place. I put both values ay 2 so that it would constantly make 2 rocks move, yet after a while it increases the ammount somehow. Am I still missing something?

Message sent from phone, sry
User avatar CollinBishop
Crytek Staff Member
Crytek Staff Member
 
Posts: 6360
Member since: 05.11.2011, 11:47
Location: Frankfurt, Germany
Likes: 1178

Re: Issue with Flow Graph nodes

Postby CollinBishop » 02.12.2014, 23:36

Could it be compounding since you are not supplying the position of the object?
User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Re: Issue with Flow Graph nodes

Postby christopheduron » 02.12.2014, 23:42

I am not sure what that means. I'm still pretty new with all this. In any case, i do supply the position the object has to travel to in the 'Movement:MoveEntityTo' nodes.

My problem here is that as far as i know, my logic is correct, but it's still not working.

Technically i could use a simple delay on all the rocks so they do their movement at different times, but i really want to learn how this random function works.

Since the first cycle works perfectly (it's only moving 2 rocks) i would assume i am using the random node correct. Maybe i'm making a mistake trying to create the continuous loop?

Thanks for all the replies so far though.
User avatar CollinBishop
Crytek Staff Member
Crytek Staff Member
 
Posts: 6360
Member since: 05.11.2011, 11:47
Location: Frankfurt, Germany
Likes: 1178

Re: Issue with Flow Graph nodes

Postby CollinBishop » 02.12.2014, 23:49

Maybe watching this will help you understand how to lace the GetPos into the movement to know the precise positioning when the movement is triggered.

User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Re: Issue with Flow Graph nodes

Postby christopheduron » 03.12.2014, 00:15

Very interesting and useful tutorial, i'll make sure to check more out.

I guess i could add a timer now that triggers a vector node every few seconds, then send it to the entitymovement and boom, it's moving up and down. I'll test this out as soon as i have some time.

That being said though, i'd still like an explanation why my own flowgraph wasn't working properly ^^. Sorry to be so stubborn, but i honestly don't see a flaw in my logic.

Keep the useful tips coming guys, i'm off for today.
User avatar CollinBishop
Crytek Staff Member
Crytek Staff Member
 
Posts: 6360
Member since: 05.11.2011, 11:47
Location: Frankfurt, Germany
Likes: 1178

Re: Issue with Flow Graph nodes

Postby CollinBishop » 03.12.2014, 00:57

The variation could be caused by the interpolation of the object. Not entirely sure but does it look like cycling issue with the interpolation not being linear?
User avatar christopheduron
Regular Dev
Regular Dev
 
Posts: 510
Member since: 23.09.2014, 10:07
Location: Belgium
Likes: 8

Re: Issue with Flow Graph nodes

Postby christopheduron » 03.12.2014, 10:04

There is no Interpol node being used in this. Then again, i probably don't understand what you're saying.