|
4 registered members (Grant, Ayumi, alibaba, Quad),
5,526
guests, and 0
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Problem mit Player Action
#156948
09/25/07 20:53
09/25/07 20:53
|
Joined: Sep 2007
Posts: 28
craik
OP
Newbie
|
OP
Newbie
Joined: Sep 2007
Posts: 28
|
also ich fang mal an: wenn ich den WED starte und eine ganz normale Platte ertselle, und dann ein model einfüge und das model dann mit rechtsklick properties einen action zuweise zB.: Code:
action player_move { player=my; // Ich bin jetzt die Spielfigur --- Now im the Player my.health =100; // 100 Leben --- 100 Healthpoints while(my.health > 0) // während meine Lebensenergie grösser als 0 ist... --- while my Healthpoints bigger than 0 { my.skill2 += time_step*8; //ANM RUN SPEED my.skill3 += time_step*6; //ANM WALK SPEED FORWARDS my.skill4 += time_step*3.6; //ANM WALK SPEED BACKWARDS player_dist.x = (key_pressed(move_forward)*3-key_pressed(move_back))*2*time; //Bewege dich nach Vorne/Hinten mit den Tasten W/S --- Move Forward/Backwards with the Keys "W/S player.pan +=1* (key_pressed(turn_left)-key_pressed(turn_right))*10*time; //Drehe dich mit den Tasten A/D --- Turn with the Keys A/D If(key_pressed(42)==1 && key_pressed(17)==1) // Wenn "Shift" und "W" gedrückt wird --- If Key "Shift" and "W" pressed { Player_dist.x*=2; //erhöhe die Geschwindigkeit des Spielers um "3*2" --- Increase the Speed of the Movement to "3*2" ent_animate(me,"Run",my.skill2,anm_cycle); //Spiele die Animation "Run" in einem Animations Zyklus mit der Geschwindigkeit von my.skill2 ab --- Play the Animation "Run" in a cycle with the Speed of my.skill2 Value } else { If(key_pressed(17)==1) //Wenn "W" gedrückt wird --- If "W" is pressed { ent_animate(me,"walk",my.skill3,anm_cycle); //Spiele die Animation "Walk" in einem Animations Zyklus mit der Geschwindigkeit von my.skill3 ab --- Play the Animation Walkin a cycle with the Speed of my.skill3 Value } else {
If(key_pressed(31)==1) // Wenn "S" gedrückt wird --- If "S" Pressed { ent_animate(me,"walk",my.skill4,anm_cycle); //Spiele die Animation "Walk" in einem Animations Zyklus mit der Geschwindigkeit von my.skill4 ab --- --- Play the Animation "Walk" in a cycle with the Speed of my.skill4 Value } else {
If(key_pressed(29)==1) //Wenn "STRG" gedrückt wird --- If "CTRL" is pressed { ent_animate(me,"attack",my.skill4,anm_cycle);//Spiele die Animation "Attack" in einem Animations Zyklus mit der Geschwindigkeit von my.skill4 ab --- Play the Animation "Attack" in a cycle with the Speed of my.skill2 Value }
else { ent_animate(me,"stand",0,0); // Wenn keine Taste gedrückt wird springe automatisch in die "Stand" Animation --- If no Key pressed jump into the Stand Animation } }
}
} camera_pos(); // Benutze die Camera Function --- Use the Camera Function c_move(my,player_dist,vector(0,0,-10),glide+ignore_passable); //Hiermit kann ich mich bewegen + Kollision --- Move me + Collision wait(1); //Warte einen Frame --- Wait one Frame } }
//---------------// CAMERA CODE \\-----------------\\
Function camera_pos()
{ camera.genius = player; //Richte mich auf den Spieler --- Look on the Player camera.x = player.x-200; //Kamera weiter nach hinten ausrichten --- Cam -200 from the Player camera.y = player.y; camera.z = player.z+250; //Höhe zwischen Kamera und Spieler --- Height between Player / Cam camera.tilt = -45; //Kamera Winkel --- Cam Orgin }
und dann das level lade, starte ich sozusagen nich als model, sondern ihrgendwo in der welt und so zusagen als spectator. und das model mach ihrgendwelche komische bewegungen. ich weiß nicht hab ich ihrgendwas vergessen einzustellen? sry bin ein Anfänger, schonmal im vorraus Danke 
Last edited by rvL_eXile; 09/26/07 15:36.
|
|
|
Re: großes Problem
[Re: craik]
#156949
09/25/07 21:37
09/25/07 21:37
|
Joined: Apr 2005
Posts: 3,076 Germany, NRW
rvL_eXile

3D Artist
|

3D Artist
Joined: Apr 2005
Posts: 3,076
Germany, NRW
|
hehe danke das du meinen COde verwendest  Erstmal bitte immer die Tags [ code] [ /code] (ohne leerzeilen) benutzen wenn du einen Code hier postest. Es scheint das du dem Spieler, also deiner Entity die Action nicht zu gewiesen hast. Da du sagtest , das das model so komische bewegungen macht (das sind die Animationenn die sie abspielt) Also im WED rechtsklick auf das Model welches der Spieler sein soll, dann Properties, dann behaviour und dort die Action zuweisen... Wenn du dort keine Action stehen hast, scheinst du das Script dem Level nicht zu geordnet zu haben dies geht so : File->Map Properties-> Dann Add Script Hoffe das hilft dir weiter cYa Sebastian P.S. Hab deinen Post editiert
Last edited by rvL_eXile; 09/25/07 21:39.
Tutorials: [Blender]Terrain creation ENG/GER [Blender]Low Poly Tree Modeling [GIMP]Create a Texture for Terrains CLICK HERE
|
|
|
Re: großes Problem
[Re: craik]
#156952
09/26/07 15:27
09/26/07 15:27
|
Joined: May 2005
Posts: 961 Bremen, Germany
tuschcarsten
User
|
User
Joined: May 2005
Posts: 961
Bremen, Germany
|
du musst neu kompilieren, nachdem du der Entity die Action zugewiesen hast
achso und gib dem Thread doch bitte nächstes mal nen sinnvollen Namen
Bit Happens!
|
|
|
Re: Problem mit Player Action
[Re: craik]
#156953
09/26/07 15:37
09/26/07 15:37
|
Joined: Apr 2005
Posts: 3,076 Germany, NRW
rvL_eXile

3D Artist
|

3D Artist
Joined: Apr 2005
Posts: 3,076
Germany, NRW
|
Wenn das auch nichts hilft, beschreib ganz genau wie du vorgegangen bist.
Beispiel:
-Level erstellt -Cbabe Model hinzugefügt -WDL inkludiert -Cbabe die Action gebeben -Compiliert
cYa Sebastian
Tutorials: [Blender]Terrain creation ENG/GER [Blender]Low Poly Tree Modeling [GIMP]Create a Texture for Terrains CLICK HERE
|
|
|
Re: Problem mit Player Action
[Re: rvL_eXile]
#156954
09/28/07 10:18
09/28/07 10:18
|
Joined: Sep 2007
Posts: 28
craik
OP
Newbie
|
OP
Newbie
Joined: Sep 2007
Posts: 28
|
|
|
|
Re: Problem mit Player Action
[Re: craik]
#156955
09/28/07 10:22
09/28/07 10:22
|
Joined: Apr 2005
Posts: 3,076 Germany, NRW
rvL_eXile

3D Artist
|

3D Artist
Joined: Apr 2005
Posts: 3,076
Germany, NRW
|
Cbabe ist das Standard Model welches im GS/Work Folder zufinden ist. Das ist das ich sags mal nett "Nicht schöne" Spieler Model (Weiblich mit Pinken Haaren )
cYa Sebastian
Tutorials: [Blender]Terrain creation ENG/GER [Blender]Low Poly Tree Modeling [GIMP]Create a Texture for Terrains CLICK HERE
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|