hey guys,
ive been for a while trying to find such a script so i can click in some region of the map(ground) then the character moves to the clicked area,however i cant seem to find that…does anyone know any kind of script that performs such action?
any help is greatly appreciated!
regards,
Romy
I actually saw a script like this a while ago. Can’t find it, but in essence you make a. flag object which tracks to the camera so you’re always facing it, then use a combination of mouseoverany and click to a script which uses if both are true, position the flag to the mouse hitpositiion. make the player move track to the fla , deacctivating the movement when near the. flag
Split it up into multiple tasks:
- set the position by mouse
- move to a postion
both can have multiple implementations. Here is my suggestion:
1.
- Have an empty that defines the target position call it “Target”
- Use one or more sensors to trigger a python controller to set Target at the position the mouse points to. You can use the S2A library. Look for S2A.hitPositionToPosition. You need mouse sensors - the python controller - any actuator owned by Target.
- If you parent a mesh object to Target you can see that its position changed.
- let the character track to Target (trackTo actuator)
- move the character forward (motion actuator)
There are surely other solutions.
im a bit confused with the above but i kindof understood how it would work…if anyone can post a sample file,that would come in handy…i know it sounds like a lazy statement but im sure its not for a newbie like me,then i can study the script and LB all togueter and find the best solutions!!
Thanks in advance,
Romy
I made an example a few days ago, but for another question. You may want to take a look at it.
http://blenderartists.org/forum/showthread.php?t=206492
When I made that, I moved the object through python. It would probably be best if you change it to use a track to actuator.
wow guys thank u so much for all ur help!
words wouldnt express how thankful i feel atm !
Agoose77 i downloaded almost all of ur files there if u dont mind lol but ill try the RTS first ofc hehe
Jbc thanks dude ima try that file too and the ill post back here the results ok?
All the best,
Romy
firstly, that’s what the archive is for!
if you make anything usefull, feel free to add it.
the zombie game is made by hippie.
no worries. try jbc’s demo as well, to see what each one does.
hi Agoose77 hows u man?
the files were great but unfortunately it only worked with cubes ,not in a more complex enviroument such as the current progress in my game but im sure if i post my game files u would find a way to apply that script ,would u mind trying to make that for me?
i jut dont know how to make my textures available without a path,not sure if the right button to achieve that is the pack images…something like that…
ok i know it sounds like i want everything premade so i can just apply things to my game but believe me its not true .i just dont get along with time lately somehow=/
any help is greatly apreciated and if needed and i believe so i can post my game files with textures packed ofc if someone tell how to do it…
thanks in advance,
Romy
Ok.
If you want to pack textures, in 2.49 go to file, external DATA, pack into blend
it’s roughly the same in 2.5/2.6
then save and upload.
i can do it differently, that was just one method
hi Agoose77,
thanx for ur attention to my thread and yeah id love to c that in different ways but i also feel like the best way for me now is to send u files even without the textures just for u to have an idea of whats the best for me but yeah it would be defenetly be kool to see that in different ways!
ok so now im uploading the file and here it is the address:
http://rapidshare.com/files/442597164/AllNewMap1packet.blend
its a bit large the file tho if u dont mind…21.69mb.
thanks again for having ur time for my thread!
Kind regards,
Romy
idont see what it does…
what u mean?
what is that blend supposed to do
nuttin beyond u help me out with the currrent enviroument in my game project…its only a .blend file with all textures packed…
what u mean what those are supposed to do?
any doubt just lemme know!
kind regards,
Romy
what do you want me to do with it?
just try to apply the click and move script to my current models…u said u had multiple ways of using that technique to the same scenario,i wonder if u can do the same with my models?
any doubt just lemme know!
kind regards,
Romy
ok, done that.
it’s really rough and ready, because its 3am, but it works!
click to move.
you can set the distance to change from running to walking.
got rid of jumping, backwards (not needed)
http://blenderarchive.hostilestudios.com/files/AllNewMap1packet.blend
still uploading, so the link wont work till about 03:15
thanks, agoose77
wow man that was really fast !!
i installed the blender beta version then i was able to see how that works…
thats really nice of u and i really appreciate that
i was wondering how did u use the parent stuff and how did u make the armature and flag to be shown in the same logic bricks?
thanks in advance,
Romy
Right
to show logic bricks, enable the SEL button in the logic panel.
what do you mean by parent?