dim3 Forum

Full Version: JoeFoe Path Activation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Have been trying to get JoeFoe Path to walk a node path with no result:

Have set and connected a series of nodes: have rebuilt the paths; have used
ids of Dest01 and Dest02 with a user value of 1. It seems as though the script
is written, ready to go for JoeFoe Path to find Dest01-but these objects don't move
at all unless you go at them with the hammer -then they come after the player.

What I am building for is a movement of cars through the portal with no player
interaction; would like AudiTT to move through my portal-disappear under an
overpass and reappear back to move thorough again. If I can get the physics
of JoeFoe Path-I'm halfway there.

Thanks for any help_giantrock73
Do you know how to script yet? I REALLY don't recommend using the joefoe script to make a car go under a underpass, it would be a really easy script to write. Do you need any help with scripting?
Come from the old Anvil/Hakvil/ResEdit Marathon interface where specs are inputted into boxes-and with Aleph One, learning how to write commands.

Have been tampering with all the line commands with some success in regards to
getting new particle effects, interface, and mesh interactions; the script logic is slowly being learned as in the documentation-it seems straight forward where ids
and command specs should go-but it is easy to misinform a line if one does not come from command lines, java script.

The JoeFoe Path was the closest thing to a node trail I could find an example of-but looking at the maps included-have not found a node trail. Any example script or existing hard copy examples would be appreciated-I know Awnee has a race course but have not been to that level of the game or seen the actual maps as his editor is not available now.

Dim3 has been a trip-enjoy working with it.

Thanks for the help_giantrock73
I don't have any examples sorry, don't use nodes alot.
Maybe make the map (just the map, not textures or course) downloadable so we can look at it and see what's wrong?
What does the car do? Does it do nothing at all, or just turn, or go in a circle? Node walking can be complex, and I really need to find a way to make it more error-proof (or just have it cough up better errors.)

Once I figure out what's going wrong with your thing, I'll try to make sure the next version throws up a warning in that situation.

Just you check out the node walking tutorial in the docs? That might help a bit.

[>] Brian
It would be the JFK motorcade through Dealey Plaza-so its a visual element-car turns onto Elm St. and disappears into the triple underpass. Would want this to repeat as an ongoing element. It seemed like a series of nodes would create the path for the object to take and then disappear into the underpass for either a out of sight pass around to the beginning or a object transport or back and forth between duplicate portals.

Will upload some shots when it gets developed more-still in the planning stages
and so used to Marathon polygon height construction-getting used to the Dim3
mapbuilding. I am going over the documentation and applying the obj commands-
its just figuring out where they work best in the AudiTT command lines is the trick.

Will keep making mistakes till I get it-any tips or scripts or examples that can be
back engineered will help_Thanks_giantrock73
Oh, I just remembered check out the bloodrush game we made for the idevgames contest, the red blood cells move out of your site then teleport behind you and keep doing that so it looks like there's lots when there's really only a few.

http://web.mac.com/mkjonathan/iWeb/Blood..._Rush.html (it's not gory, though it should be :P. It's about fighting off viruses. Just find the red blood cell script.

[EDIT]I just found the script myself:
Code:
var anim, location;

function construct(obj)
{
    obj.model.on=true;
    obj.model.name='bloodcell';
    obj.model.lit=DIM3_MODEL_LIT_VERTEX;
    obj.model.offset.x=Math.round(Math.random()*6000)-3000;
    obj.model.offset.y=-Math.round(Math.random()*4000);
    
    obj.size.x=100;
    obj.size.z=100;
    obj.size.y=100;
    obj.size.weight=1000;

    obj.setting.contact=false;
    obj.setting.hitBox=true;
    obj.setting.damage=true;
    
    obj.turnSpeed.facingWalk=5;
    obj.turnSpeed.motionWalk=5;
    
    obj.forwardSpeed.walk=Math.round(Math.random()*40)+50;
    obj.forwardSpeed.acceleration=1.0;
    obj.forwardSpeed.deceleration=1.2;
}

function spawn(obj)
{
    var            nodeId,nodeName;
    location=0;

    anim='turn'+Math.round(Math.random()*2+1); //utility.random.getInteger(1,3);
    obj.model.animation.start(anim);
//    obj.model.animation.start('turn1');

    obj.model.rotate.x=Math.random()*359;
    obj.model.rotate.y=Math.random()*359;
    obj.model.rotate.z=Math.random()*359;
    
    obj.watch.start(30000);
    obj.event.startTimer(50,0);
        
    nodeId=map.node.nearest(obj.position.x,obj.position.z,obj.position.y,null,obj.angle.y,null,180,10000);
    if (nodeId==-1) return;
    nodeName=map.node.getName(nodeId);
    
//    obj.forwardSpeed.walk=35;
    obj.motionVector.walkToNode(nodeName,obj.setting.getParameter(location),0);
    location++;
    }

function bringBackToPlayer(obj)
{
    var xpos, zpos, ypos, angle, node;

    angle=utility.angle.sub(map.object.getAngle(map.object.findPlayer()).y,180);
    
    xpos=map.object.getPosition(map.object.findPlayer()).x;//+Math.round(Math.sin(angle/180*3.1415)*2000);
    zpos=map.object.getPosition(map.object.findPlayer()).z;//-Math.round(Math.cos(angle/180*3.1415)*2000);
    ypos=map.object.getPosition(map.object.findPlayer()).y;
                        
//    obj.position.place(xpos,zpos,ypos,angle);
    
//    idNode=map.node.nearest(obj.position.x,obj.position.z,obj.position.y,null,obj.angle.y,180,0,50000);
    node=map.node.nearest(xpos,zpos,ypos,null,utility.angle.add(obj.angle.y,180),90,15000,30000);
//    iface.console.write(map.node.getPosition(node).x);
    if (node!=-1) {
        obj.position.place(map.node.getPosition(node).x,map.node.getPosition(node).z,map.node.getPosition(node).y,obj.angle.y);
        obj.motionVector.walkToNode(map.node.getName(node),obj.setting.getParameter(location-1),0);
    }

//    obj.event.sendMessage(DIM3_MESSAGE_TO_PLAYER,'Player',1);
}

function event(obj,mainEvent,subEvent,id,tick)
{
    switch (mainEvent) {

        case DIM3_EVENT_CONSTRUCT:
            construct(obj);
            return;
    
        case DIM3_EVENT_SPAWN:
            spawn(obj);
            return;
            
        case DIM3_EVENT_DAMAGE:
            spawn.particle(obj.hitPosition.x,obj.hitPosition.z,obj.hitPosition.y,'JoeFoe Blood');
            bringBackToPlayer(obj);
            return;
            
        case DIM3_EVENT_WATCH:
            if (subEvent==DIM3_EVENT_WATCH_OBJECT_FAR && obj.watch.objectIsPlayer) bringBackToPlayer(obj);
            return;
            
        case DIM3_EVENT_PATH:
                if (subEvent!=DIM3_EVENT_PATH_DONE) return;
                obj.motionVector.walkToNode('join'+location,obj.setting.getParameter(location),0);
                location++;
            return;
            
        case DIM3_EVENT_TIMER:
            if (map.object.getDistance(map.object.findPlayer(),obj.position.x,obj.position.z,obj.position.y)>50000) bringBackToPlayer(obj);
            return;
    }
}
(Romuald [sp?] wrote it)
I played Blood Rush a bunch after downloading all the finished Dim3 games:
the blood cells that group and track the player were in-depth and had a great
lurking quality: that would a path
node logic-thanks for the code.
Will get to work on it. Thanks for the help.

giantrock73
The AudiTT is moving between two points-used the Loc07, Dest01 node instructions
in the Node Paths Tutorial with the obj.motionVector.walkToNode("Loc07",'Dest01',155);
placed in the AudiTT header script and it works smoothly.

Don't know what the 155 variable is and glad that placing the lines is
not as specific as I had thought. Looks like once you get the hang of this
it's a lot more informal than it looks.

Will go through the Blood Rush script to work some complexity into the paths-
thanks as was not getting any results for 48 hours_giantrock73[/align]
Do you have something against saying I? such as I did this I will do this.
Pages: 1 2 3
Reference URL's