|
|
ent_create problem
#224702
08/31/08 20:28
08/31/08 20:28
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
Hi, well my first game in 3D GameStudio is coming alone fine. Need a little help on this I am trying to put a missile at the same pos. as a ship. code:
ent_create("missile1.mdl", vector(ship1 x,ship1 y,ship1 z),missile1);
syntext error. I just don't know how to write it in lite-c I hope someone can help. Thank You renny
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Re: ent_create problem
[Re: sadsack]
#224706
08/31/08 20:41
08/31/08 20:41
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
it should be...
ent_create("missile1.mdl", vector(ship1.x,ship1.y,ship1.z),missile1);
we use the "." operator to access the properties of an object/struct.
Last edited by DJBMASTER; 08/31/08 20:41.
|
|
|
Re: ent_create problem
[Re: DJBMASTER]
#224717
08/31/08 21:28
08/31/08 21:28
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
Hi, what I am trying to do is when you press a key there is a missile created at the ship1 pos. this code should do that, but the missile never get load. I want to off set it so no coll. is taking place. new offset code:
action act_missile1()
{
while(1)
{
if (key_b) {ent_create("missile1.mdl",vector(ship1.x ,ship1.y,ship1.offset_z=-100),missile1);}
}
}
If I use this code above, the missile never loaded. but if I just load the missile like this it does load
in main
ent_create("missile1.mdl",vector(ship1.x ,ship1.y,ship1.z),missile1);}
But the offset code I got from the manual does not compile
ent_create("missile1.mdl",vector(ship1.x ,ship1.y,ship1.offset_z=-100),missile1);}
I hope you can understand what I am saying. I been working on this for three days now, I think it time a take a rest. renny
Last edited by sadsack; 08/31/08 21:31.
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Re: ent_create problem
[Re: sadsack]
#224720
08/31/08 21:59
08/31/08 21:59
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
lol, scripters never rest!!! If I were you, I'd not create an event which is looking for a button press, (btw it's missing a wait(1); ) but instead only put it when the button is pressed. This won't save you a huge amount of fps, but it will save some later if you're running plenty of functions. Also this will stop missles being created every frame, if b is held. so.... action missile1(){
//your action in here
//prob c_move
}
function create_missile(){
if(ship1){ //makes sure ship1 exists
ent_create("missile1.mdl", vector(ship1.x, ship1.y, ship1.z-100), missile1);
}
}
void main(){
on_b = create_missile;
}
NB I've not used your ship1.offset_x=-100, this wasn't setting anything Hope this helps 
|
|
|
Re: ent_create problem
[Re: sadsack]
#224721
08/31/08 22:05
08/31/08 22:05
|
cemetarycat
Unregistered
|
cemetarycat
Unregistered
|
LoL! sadsack
I'm still Waiting For Magic. For my Ace of Base....rather than a lot of pain,difficulty, questions, frustration and headaches coding.
And it doesn't make it any easier cause I do like 3D Game Studio...and especially the Lite C scripting language. But alas!
and with that said, I hope you find a solution and answer to your ent_create question/problem.
cheers
|
|
|
Re: ent_create problem
[Re: ]
#224723
08/31/08 22:13
08/31/08 22:13
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
yes, I do have lot of pain,difficulty, questions, frustration, headaches and melt downs. Hey old cat, I hope you had a nice weekend. I was with lite-c all week end. she is one mean woman. but I think I am winning her over. renny EDIT: cat if you want, I have a chat room on my site, few of us cheap game makers hang out there some time. www.thegusworks.com If you want to stop by and say hi let me know and I will let you know when we are going be htere. rdh
Last edited by sadsack; 08/31/08 22:23.
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Re: ent_create problem
[Re: sadsack]
#224758
09/01/08 03:32
09/01/08 03:32
|
cemetarycat
Unregistered
|
cemetarycat
Unregistered
|
haha, so true. about the pain and difficulties. But I met up with Ice Cube and he told me to go Torque or else he will kick my butt.  ahhhhhhhhh......  And Da Spokes Man for Torque Game Builder. perhaps and sometime in the future...I will one day 'Command and Conquer' 3D Game Studio and Lite C. cheers =)
Last edited by cemetarycat; 09/01/08 03:33.
|
|
|
Re: ent_create problem
[Re: ]
#224851
09/01/08 15:14
09/01/08 15:14
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
hey, cat sound good, if you want somenice free textures go here http://www.thecodebrewers.com/Textures.htmlwill talk to you later, If you have time I will be at my chat room at 3 PM EST. I think it is noon your time. www.thegusworks.com
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Re: ent_create problem
[Re: MrGuest]
#224855
09/01/08 15:31
09/01/08 15:31
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
Thanks MrGuest I will try your code out this very afternoon. renny
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Re: ent_create problem
[Re: sadsack]
#224898
09/01/08 20:48
09/01/08 20:48
|
Joined: Aug 2008
Posts: 408 mi usa
sadsack
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2008
Posts: 408
mi usa
|
Well MrGuest, I got your code to work at last, made one small change in it.
Thank You renny
I have A7 Commercial .............. Now I just need to learn how to use it
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|