2 registered members (AndrewAMD, juanex),
1,247
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: My first 10 Seconds with GS
[Re: Xarthor]
#334849
07/25/10 16:26
07/25/10 16:26
|
Joined: Jul 2010
Posts: 127 Germany, Herford
Ditje
OP
Member
|
OP
Member
Joined: Jul 2010
Posts: 127
Germany, Herford
|
'_x' is just an name for indice 0, '_y' for 1 and '_z' for 2. Like in PHP. I used the underscore, because x,y,z are keywords - an old usage from Macromedia Director Same with array ids - I wanted to ignore epos[0][0], eops[0][1] and epos[0][2] - just keeping them empty Now I have understood, what i+j or j+k means But my Code still doesn`t work:
...
epos[0][0] = -50;
epos[0][1] = 800;
epos[0][2] = 300;
epos[1][0] = 50;
...
function start_bee_wave1()
{
...
c_wert_x = (epos[my.ENEMID-1][0] - my.x) / 10;
c_wert_y = (epos[my.ENEMID-1][1] - my.y) / 10;
c_wert_z = (epos[my.ENEMID-1][2] - my.z) / 10;
c_move(me, vector(0, 0, 0), vector(c_wert_x * time_step, c_wert_y * time_step, c_wert_z * time_step), IGNORE_MODELS);
...
All enemies move to (0,0,0). I am sure, that my.ENEMID is set, because I use it before and don`t unset it. Even when I remove "-1" (should point to first array element, if my.ENEMID == 0) enemies move to (0,0,0). So there must be no values. epos-Array is defined global. Ditje
Last edited by Ditje; 07/25/10 16:30.
|
|
|
Re: My first 10 Seconds with GS
[Re: Saturnus]
#334861
07/25/10 16:59
07/25/10 16:59
|
Joined: Jul 2010
Posts: 127 Germany, Herford
Ditje
OP
Member
|
OP
Member
Joined: Jul 2010
Posts: 127
Germany, Herford
|
oh - no they aren`t in a function. But I have read, that variables are not global, if they are within a function. They have to be global. I will try and and read some more Edit: I`ve put the array into the function and now it works. Be sure - I will ask again, if I need the array beside this function Thanx for all the help Ditje
Last edited by Ditje; 07/25/10 18:14.
|
|
|
Re: My first 10 Seconds with GS
[Re: Ditje]
#334900
07/25/10 20:06
07/25/10 20:06
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Just for clarification: The definition of the array should be outside a function to make it global, otherwise its local. Definition is: The initialization of the array (assignment of values) should be inside a function, like Saturnus said. (In this case:)
epos[0][0] = -50;
epos[0][1] = 800;
epos[0][2] = 300;
epos[1][0] = 50;
|
|
|
Re: My first 10 Seconds with GS
[Re: Ditje]
#335191
07/27/10 08:08
07/27/10 08:08
|
Joined: Jul 2010
Posts: 127 Germany, Herford
Ditje
OP
Member
|
OP
Member
Joined: Jul 2010
Posts: 127
Germany, Herford
|
Yeah - first enemy wave does what I want Since I don`t want to upload every development step to youtube, I uploaded here for download: http://www.open-beats.de/temp/galaga3d_20seconds.wmvEdit1: Ups - Please wait a minute - file is not complete. Edit2: Other server - file is online now. Ditje
Last edited by Ditje; 07/27/10 08:17.
|
|
|
Re: My first 10 Seconds with GS
[Re: Ditje]
#335192
07/27/10 08:11
07/27/10 08:11
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
Looking really nice so far, If you produce this kind of thing already as your first step, I am really excited to see how you are gonna be doing the next couple of years Keep up the nice work, and to be honest, you should upload every step to youtube! It's just a nice central place to keep your stuff together, and you can keep track of your progress nicely that way Thumbs up! regards,
|
|
|
Re: My first 10 Seconds with GS
[Re: Helghast]
#335199
07/27/10 08:46
07/27/10 08:46
|
Joined: Jul 2010
Posts: 127 Germany, Herford
Ditje
OP
Member
|
OP
Member
Joined: Jul 2010
Posts: 127
Germany, Herford
|
To clarfy: I am an absolute Newbie to Gamestudio and lite-C (or other C-languages) but I did some game development during the last 15 years. From 1996 to 2003 I did a lot of applications and games with Macromedia Director. Two applications for fire and smoke protection where official released and quite complex. I still have the CDs. From 2001 to 2003 I was working on the HoMM-Mod Wake of Gods Later some games with Flash - but I don`t like Action Script. Since there where only a few jobs during the last years - working with flash got more less. Since 2003 I am mainly working with PHP. At the beginning of this year I started to mod Gothic III. But stopped. I had the experience of HoMM-WoG. You can`t do anything with the knowledge about modding a specific game. So hours of learning for nothing. Several weeks ago I found Gamestudio by chance and it gave me new motivation to restart game development. I have never studied any language - so my Knowledge is fragmentary Ditje Edit: Jij bent van Nederland? Leuk :-) Ik ben an het grenz upgegruit.
Last edited by Ditje; 07/27/10 08:51.
|
|
|
Re: Next stepp is done
[Re: Ditje]
#335763
07/30/10 13:38
07/30/10 13:38
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
Expert
|
Expert
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
|
looks really cool. I love the 2d/3d look. the models are blocky ans pixellated like the old school game, yet really detailed. great work!
My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
|
|
|
|