A few problems with logic
I'm well into my first scene, but I've been stuck on a few key pieces of logic for awhile now...These are a bit lengthy, so bear with me-
First:
How do I make something start as visible, then when a certain interaction is made have the object become invisible, then become visible again when a different interaction is made?
I have the interactions themselves all figured out and working. However, when I add anything to the visibility of the object I want to disappear temporarily it always starts as invisible until the first interaction is made then it becomes visible, then becomes invisible again when the second interaction is made...the exact opposite of what I need.
I have tried Timers, Switches, Signal Generators, etc. I have tried them plugged into the power of the object and have tried them plugged into the visibility of the object. It seems as soon as anything is plugged into either one, that object automatically defaults to an invisible state, with no way for it to start visible then have the signal tell it to become invisible.
Second:
I have an object that floats in the air and follows the player, unless the player gets too close then it flees a small distance away. This object also has a look at rotator so it is always facing the player. However, I want this object to only stay in a specific area while following the player.
I have tried creating an invisible wall around the area I want the object to stay, but it phases right through the wall. I have the wall set to collidable as well as the object itself set to collidable. I have tried all manner of combinations on the object using "Collides with..." and "Labels" yet it still phases right through everything. The invisible wall works fine blocking the player though.
I have even tried putting a tag on the wall for the object to flee from, but it phases right through. Also tried setting the object to moveable, but then it drops like a stone even if density is turned to 0 or ignore gravity is applied.
Any ideas why it won't work as I want it to?
Third:
This is also with the object mentioned in the second problem. I want the object to be connected by something like a "rope" (which will be visible to the player) to another object. However, the object ignores any length set on a string connector and travels however far it wants in order to get to the player. Even attaching it to a pre-made "rope" like item that is multi-segmented just makes it stretch the premade item and continue on until it reaches the player. How do I make it so once the string connectors length is reached, the object that follows the player stops?
Thank you in advance for any and all help! Hope I described everything well enough...
-
1. If you have it functioning properly in reverse it sounds like a Not gate before you plug it into Visible would solve all your problems
2. How about if you put a trigger zone on the object that looks for object labels (eg walls). The trigger zone detected would turn off the flee logic if it gets too close to a wall.
3. I’m imagining something like a chain chomp from Mario? First I would make a trigger zone around the anchor point that lays out where the chain chomp can move. In zone? Move towards player. The problem is once it leaves the zone it stops moving and doesn’t restart. Maybe you could make it like a chain chomp where after a 1 second timer it follows the anchor point for a second, then turns the follow player back on. i.e. it moves towards the player till it’s at the edge of the zone, it pauses for 1 sec, backsteps, then moves towards the player again, zone out, 1 sec, backstep. The rope wouldn’t actually limit it, it would be for show. -
1. Use the selector. Wire a keyframe setting the object to visible and keep changes to port A
and invisible to port B
Wire your interactions to the next port on the selector.
When the player interacts first it will be made invisible, second, visible, third invisible, fourth invisible etc... -
1. @LadyLexUK; @PhantomGazebo: You two rock! A combination of both your suggestions did the trick...the object is now doing as I had hoped. Thank you! I'll be sure to add you both in the credits of my Dream.
2. @PhantomGazebo: I ran with your trigger zone suggestion on this...Attached a trigger zone on the object and set a small radius to detect the "Scenery" label of the invisible wall. When this is detected, the speed on the follow gadget is reduced and the object doesn't advance further.
While I kept this solution, it introduced a new problem. Once the speed was reduced the object stopped following the player completely, no matter where in the room the player moved. To remedy this, I had to add a second, low speed "Flee" to the object which reacted to a tag. I then built a barrier around the invisible wall made of many tags. Now the object will repel ever so slightly, just enough to get out of the "Scenery" detected zone.
Makes me wish the Tag gadget worked like a lot of the other gadgets do...If it is surface snapped or attached to an object, the whole object is recognized as that tag. Would be far easier than having to use a ton of individual ones.
3. Unfortunately I am still wresting with this one. The chain chomp image is funnily enough the first thing that popped in my head too...Not what I am making, but very similar in concept.
If I make the floating object the child end of the string connector, it just drops and dangles around in the air by an invisible string. If I make it the parent end of the string connector, it floats fine but the "rope" like object just drops to the ground.
I suspect a lot more tinkering is ahead of me.
Accedi per aggiungere un commento.