snkman 351 Posted May 24, 2007 Hey Guy's, well i just tryed to find out the speed mode of the units using: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#start _grpspeed1 = speedMode grp1 ?grp1 speedmode = "FULL" : hint "FULL" titletext[format ["\n\n\n %1 ",_grpspeed1], "Plain down"] ~3 goto "start" But with titletext i always get SpeedMode "NORMAL" and the hint messege is never shown up... Is this a bug or did i do something wrong? Share this post Link to post Share on other sites
mr.peanut 1 Posted May 24, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">?grp1 speedmode == "FULL" : hint "FULL" You drop an equals sign. Share this post Link to post Share on other sites
snkman 351 Posted May 24, 2007 Hey Mr.Peanut, nope that was not the problem. It think it's a bug becouse if fast i run fast it shows NORMAL and if i walk slow it show NORMAL too.. Edit: Okay i don't know why but it looks like speedMode is only working with AI and not with Players. Share this post Link to post Share on other sites
crashdome 3 Posted May 24, 2007 That is correct. SpeedMode is an enumeration of AI behavior. I signifies that they should move as quickly as possible to next waypoint. It does NOT mean they should run full speed 100% of the time as if double tapping the forward keys. As with most of those commands, they do not and probably never will apply to player controlled units. If you want to determine the velocity of the player, I would use the many commands available for that (i.e. velocity player) and building your own custom enumeration (if so needed). Share this post Link to post Share on other sites
snkman 351 Posted May 24, 2007 I already tryed the velocity command but if i use the example i always get an error: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? velocity player > 2 : hint "FULL" velocity player |#|> 2 Error: >: Typ Array, expected number Share this post Link to post Share on other sites
Blanco 0 Posted May 24, 2007 Use speed instead of velocity http://community.bistudio.com/wiki/speed Share this post Link to post Share on other sites
Flat!!! 0 Posted May 24, 2007 If you use speed in cars the speed hint will go crazy when you stop the car for about 5 secs. It is pretty annoying. Share this post Link to post Share on other sites
mr.Flea 0 Posted May 24, 2007 Quote[/b] ]?grp1 speedmode = "FULL" : hint "FULL" try Quote[/b] ]?speedmode grp1 == "FULL" : hint "FULL" Share this post Link to post Share on other sites
Big Dawg KS 6 Posted May 24, 2007 I already tryed the velocity command but if i use the example i always get an error:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">? velocity player > 2 : hint "FULL" velocity player |#|> 2 Error: >: Typ Array, expected number Velocity doesn't return a number, it returns a velocity vector in the form of an array of 3 component vectors (the x, y, and z components). You need to either calculate its magnitude (Pythagorean theorem) or use the speed command. Share this post Link to post Share on other sites
snkman 351 Posted May 25, 2007 Thanks for the replay's guy's. I think i stick to the speed command it's easy to use and it's good for what i need it. So THX to all. Share this post Link to post Share on other sites