Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,086 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
RPG Movement Problem #313800
03/03/10 17:50
03/03/10 17:50
Joined: Dec 2009
Posts: 57
USA
M
marianschuth Offline OP
Junior Member
marianschuth  Offline OP
Junior Member
M

Joined: Dec 2009
Posts: 57
USA
Hallo,
Ich habe ein Problem mit der Bewegung im RPG Movement von der Acknex Seite. Es scheint am Terrain zu liegen. Man kann immer ein Stückchen gehen, aber irgendwann hängt man im Boden fest bzw. kommt nicht weiter. Wie könnte man das lösen?

Re: RPG Movement Problem [Re: marianschuth] #313801
03/03/10 17:52
03/03/10 17:52
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline
User
hopfel  Offline
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
Ich würde mal versuchen, dein Modell nicht mit c_move auf den Boden zu drücken, sondern es mit c_trace über dem Boden zu halten. hier findest du ein paar Beispiele die funzen sollten:

http://www.opserver.de/ubb7/ubbthreads.p...true#Post311664


Hilf mir, dir zu helfen!
Re: RPG Movement Problem [Re: hopfel] #313809
03/03/10 18:24
03/03/10 18:24
Joined: Dec 2009
Posts: 57
USA
M
marianschuth Offline OP
Junior Member
marianschuth  Offline OP
Junior Member
M

Joined: Dec 2009
Posts: 57
USA
Hab direkt das erste probiert: Klappt perfekt!!! Danke!!! smile

Re: RPG Movement Problem [Re: marianschuth] #316978
03/28/10 12:13
03/28/10 12:13
Joined: Dec 2009
Posts: 57
USA
M
marianschuth Offline OP
Junior Member
marianschuth  Offline OP
Junior Member
M

Joined: Dec 2009
Posts: 57
USA
Jetzt habe ich wieder fast das gleiche Problem, ohne dass ich bewusst etwas verändert habe. Ich gehe ein Stück mit der Spielfigur, drehe sie um und stoße auf eine unsichtbare Mauer. Ich drehe sie wieder um, gehe ein Stück, drehe sie um und habe wieder so eine unsichtbare Mauer. Woran kann das liegen???

OK, hat sich erledigt. Es funktioniert aus irgendeinem Grund wieder.

Hat sich doch nicht erledigt, ich hatte nur das Passable Häkchen gesetzt...
Bitte helft mir!!!

Wenn ich die Flags Passable und Polygon setze kann man normal gehen, allerdings flieht man in den Himmel , wenn man gegen ein Kollisionsobjekt läuft.

Argghh!! Ich kapiers echt nicht!!! Mein Playermodell hat jetzt keine Flags (außer OVERLAY, BBox und SHADOW). Jetzt lässt es sich problemlos steuern, aber man startet fast immer im Himmel und bleibt dort stecken oder man fällt ganz langsam auf den Boden um von dem meistens wieder in den Himmel geschossen zu werden. Wenn man das Glück hat direkt auf dem Boden zu starten, kann man an Menschen hochlaufen... Ich verzweifle hier echt, bitte helft mir!!

Das ist das animation.c aus dem RPG Movement Projekt mit neuem gravity code und das Player Script ist das Originale.

#define mForward 1
#define mBackward 2
#define mTurnRight 4
#define mTurnLeft 8

#define runSpeed 24
#define walkSpeed 8

#define ActionWalk 1
#define ActionRun 2
#define ActionIdle 3
#define ActionFall 4
#define ActionTalk 5


#define WaitingTalk 1
#define Talking 2
#define TalkingOutOfRange 3

#define FallDistance skill28
#define FallVelocity skill29
#define GravityAccel skill30

#define CurrentAction skill31
#define PreviousAction skill32
#define AnimationPercent skill33

#define Running skill34
#define MovementAction skill35

#define Blending skill36
#define BlendingPercent skill37

#define SizeOffset skill38
#define RadiusSize skill39

#define TalkingState skill40

var gravity=0;
var my_height=0;

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Handles the gravity
////////////////////////////////////////////////////////////////////////////////////////////////////////////

function handle_gravity()
{
my_height = c_trace(my.x,vector(my.x,my.y,my.z-10000),USE_BOX|IGNORE_PASSABLE|IGNORE_ME);

if(my_height > 5) { //if I'm flying
my.z-=gravity*time_step; //push me down
gravity+=1*time_step;} //realistc falling
else
if(my_height < 4) //if I'm going uphill
{my.z-= my_height-4.5;} //push me up
else //else
{gravity=0; //set gravity on zero
if(key_space) //if you will jump
{my.z+=3*time_step; //push me up
gravity=-20;} //and set the gravity on -20
}

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Handles entities movement
////////////////////////////////////////////////////////////////////////////////////////////////////////////
function handle_movement(VECTOR* displace, VECTOR* absMovement, var otherFlags){
var typeGravity = IGNORE_MODELS | IGNORE_PASSABLE | GLIDE | otherFlags;
if(vec_length(displace)!=0){
c_move(me,displace,absMovement,IGNORE_PASSABLE | GLIDE | otherFlags);
// Check if the angle is too steep
if(trace_hit==1 && (normal.z >= ZNormalTolerance && normal.z <1)){
typeGravity &= ~GLIDE;
}
}
handle_gravity();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Handles the animations
////////////////////////////////////////////////////////////////////////////////////////////////////////////
function handle_animation() {
STRING* animationName;
var animFactor;
var blendFactor;
var animStart = 0;
var animEnd = 100;
var animType = ANM_CYCLE;
switch(me.CurrentAction){
case ActionIdle:
animationName = "Stand";
animFactor = 1;
break;
case ActionRun:
animationName = "run";
animFactor = 7;
break;
case ActionWalk:
animationName = "Gehen";
animFactor = 5;
break;
case ActionFall:
animationName = "fall";
animFactor = 15;
animType = 0;
break;
}

// Action changed
if(my.CurrentAction!=my.PreviousAction){
my.Blending = 1;
my.BlendingPercent = 0;
}
// Blend
if(my.Blending){
if(my.BlendingPercent>=100){ // Blending ended
my.Blending = 0;
my.BlendingPercent = 0;
my.AnimationPercent = animStart; // Animation starts in animStart
}
else{
ent_blend(animationName, animStart, my.BlendingPercent); // Blend animation
my.BlendingPercent += 45 * time_step;
}
}
// Animate when not blending
if(!my.Blending){
if (my.AnimationPercent > animEnd ){ // Animation ended
if(animType == ANM_CYCLE)
my.AnimationPercent = animStart; // Restart if ciclic
else
my.AnimationPercent = animEnd;
}
ent_animate(me,animationName,my.AnimationPercent,animType);
my.AnimationPercent += animFactor * time_step;
}
my.PreviousAction = my.CurrentAction; // Update previous action
}


Das RPG Movement Projekt könnt ihr auf der Free Resources Seite unter Demos downloaden. (In dem Projekt funtioniert es perfekt, nur manchmal klappt es mit der Gravitationskraaft nicht, die hat bei mir überhaupt nicht funktioniert und nach dem Ändern immer noch nicht))

Last edited by marianschuth; 03/30/10 07:25. Reason: HILFE

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1