Posted By: not_me
overlay? - 04/19/07 03:04
im wonder im making a game and i want something(a model) to be ontop of everything(in the top layer) so even if you standing behind a wall you can see it. it acts as a pointer in missions shows you where to go. how would i do this?
EDIT: oh and is there a way to just have a few models(not ai, too complicated for me) folow you and shoot enemies. i know you can make some models follow you. but can i make them attack enemies. sort of as helpers? is there a code snippete some where or can i find it in the manual. and is there like a book or website that can teach me how to c-script? cus my fingers are gonn fall off if i ask one more question in the 3dgs forum.
I think there's a flag for this. Something like my.near = on;
As for the model to be on top of everything , if it has to be a model , then you can use a view entity , even though I've never used one , technically that should work because you can assign a layer number and they are more or less treated like panels , otherwise a panel would be the way to go. About the models following you and shooting at enemies , it's simple , just make an action for them , and have this action detect enemies , and have them shoot at them if they detect them. Or , you can actually code this into your players action , where if he is aroudn some enemies , the player's action can then trigger the shoot or attack function of the helpers. To detect enemies it's not too complex , basically just a scan or trace (depending on if you wanna detect all aroudn the player or just in front) and something like if (result!=null&&you.skill70>0){helpers_attack();} , Something like that should work , look for more info on scan and trace and the like , but it's not too hard.Btw , you would need to call that in a loop , or if you call it from within the players action or function just make sure it's within the while(1) and the wait(1); , because you have to keep checking for enemies. I used skill 70 but you can use any skill you want , and just make sure that the enemies get that skilled assigned to them in their creation either through script or in wed. Just look for more info on the manual about scan and trace , and if your using templates , open them up in SED and take a look at the code , it might look really confusing , but it's not impossible to figure out. As for learning to script , well there's the manual , which includes the learn wdl in 7 days or something , and it's the best reference you can have , there's also the AUM (Acknex User Magazine) which is very very good , it includes a ton of scripts for many different types of things which are very helpfull , you should definately check it out, there's also Grimber's site , which also has a ton of scripts and tutorials as well as other resources , and dont forget to check out AU Resources link in the main Gamestudio Homepage , it includes everything from tutorials to scripts to models and demos. Good luck.
Posted By: Xarthor
Re: overlay? - 04/19/07 11:28
@xXxGuitar511: its znear: "my.znear = on;"
Ah, I had a feeling about the z, but I wasn't sure