Please or Register to create posts and topics.

Making a cube 'scoot' to a location

I am trying to get a cube scoot itself to a location, ideally with some of the pathfinding AI stuff, but I am having trouble figuring out how to make it move or find a path. Any advice?
Thank You,
Sound Logic

Try parenting the cube to a func_tracktrain that moves along path_track's until you have it where you want it to and unparent it.

I dunno about finding a path though, maybe elaborate more on what you mean??

?????????????????????????????TWP Releases | My Workshop

The npcs have pathfinding patterns that they use, and I would like to basically make a moving npc cube.

I remember someone made a companion cube that followed the player and killed them when they came close. That's technically not pathfinding though...

You might have too look through HL2 code (or L4d2) and find similar code for certain npc's. If portal has coding for some sort of moving ai that would be a start. In portal both Wheatley and Glados move around and look at the player when you look around, this might be a start for ai?

/me never has played around with this though.

?????????????????????????????TWP Releases | My Workshop

Huh. Do you have any idea where the companion cube was? Was it for portal 2 or portal?
Thank you for your help,
Sound Logic

http://www.youtube.com/watch?v=SzW_6xeGapw
Though this is in garrys mod :S

I can't find the original one, and I think it was Portal 1

?????????????????????????????TWP Releases | My Workshop

Hum... Well, I think I can use the func traintrack for movement, though a generic npc that just tells you what direction to go to get somewhere would be nice. Oh well. There don't seem to be any moving npcs in portal 2, and since we can't add entities I can't copy the code from the ones from half life and other games. Pity. If anyone has any other ideas though, I would love to hear them.
Thank You,
Sound Logic

Well, I have an attempt at it, but it isn't working. Here is what I have so far:
Also: The cube should only move when it isn't being looked at, but that part should work just fine. The problem is in getting the cube to move at all.
Thank You,
Sound Logic