Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Quad), 6,361 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
global var in function #295336
10/24/09 13:55
10/24/09 13:55
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
hi, when the character jump and 'is near to touch'/'touch' the ceiling, the camera go through wall, camera clip near works nice but jump still buggy in this case.

so im looking for 2 sort of solution (solution for camera would be the best for me):

-if someone has an idea on how to block the camera in case of jump. (vector too hard for me, i use basic 3rd person camera).

or

-i tried to found out a solution alone : "when u touch the house, u cant jump anymore, then if u go outside, u can jump" (sucky but no choice due to camera bug).
so i got this code :

Quote:
function saud()
{
if (event_type == EVENT_IMPACT)
{
beep();
jump=0;
}
}

action inside
{
my.ENABLE_IMPACT = ON;
my.event=saud;
}


i got mass beep but player can still jump.
jump is a global variable but looks like jump=0; don't change anything (basic value is 75, and the player can jump high). tried send_var(jump) too but it change nothing.

thx

Re: global var in function [Re: ayks] #295377
10/24/09 21:04
10/24/09 21:04
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
If the beep() was executed and if there is no other beep() in your script, jump has definately been set to 0. So the error must be somewhere else in your script. If you need help finding it you gbetter post your whole script.

Re: global var in function [Re: Lukas] #295397
10/24/09 23:45
10/24/09 23:45
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
ok ty for answer, i tried to search out more and now i think the problem is more annoying

i tried this basic action for try to find the main problem:
Quote:
action inside
{
str_cpy(test_str,"ZZZZZZZZZ");
jump=90;

wait(50);

str_cpy(test_str,"");
jump=0;
}


the message appears on start, and dissapears fast
but
the jump is fixed to 90 at start (usual is 75), but don't go to 0 after the wait..
so it looks like i can't change the value of "jump" during the game..
so, indeed, it has been set to 0, but the program don't care about it in game t_t

Last edited by ayks; 10/24/09 23:46.
Re: global var in function [Re: ayks] #295540
10/25/09 22:22
10/25/09 22:22
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Hmm how are you viewing the value of jump? The best way to do this is imo with a PANEL* with digits. Or are you just looking whether the player still can jump? Because it might be possible that jump does be set to 0 but the problem is somehwere else wink

Re: global var in function [Re: Lukas] #295545
10/25/09 23:27
10/25/09 23:27
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
Quote:
hi,
in plbiped01.wdl, i have a line like
if(my._jump_height__003 == 0) { my._jump_height__003 = 75.0; }

so i add
my._jump_height__003=jump;

and in the begin of the wdl i add
var jump=75;


so i can change this value in other wdl (i learned it here and it works very well for move_x and move_y)

but im not sure it answers to what u say :X

i don't think i can view the value of jump.. as you say, i think i am just looking if the player can jump or not. (and how high)

i don't think the problem is somewhere else + i tried everything. i'm on it since about 2 days and it looks so illogical, my previous message's code should work :x
got no problem to block the player movement (move_x and move_y) but it just dont work for jump..
tx anyway for this answer, i'll search out more :l


edit : i just add a very weird thing (for me)

Quote:
action inside
{
jump=90;
jump=0;

}

jump=0 forever in the game.

Quote:
action inside
{
jump=90;
wait(1);
jump=0;
}


jump=90 forever in the game.
i'm affraid it looks too illogical for find a solution to it --


Last edited by ayks; 10/25/09 23:31.
Re: global var in function [Re: ayks] #295594
10/26/09 13:01
10/26/09 13:01
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Like Lucas said
try a panel in your script.

Code:
PANEL* saute_ouinon = {
digits(10,10,5.1,*,1,jump); 
flags = SHOW; 
}



The value of jump will always be on the screen.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: global var in function [Re: Ottawa] #295611
10/26/09 15:04
10/26/09 15:04
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
hi :L
omg, its -partly- in french, good job shocked
i just did it, now i, indeed, get the value in the left top corner, no problem for it.

using this code :

Quote:

action inside
{
jump=30;
wait(200);
jump=20;
wait(200);
jump=75;
wait(200);
jump=9001;
}


the basic jump is set to 30 (so it works for the first change), then the value changes after the little wait, but it sadly dont change anything concerning the jump of the player, looks like its always 30.. frown

i did a little video for show it --
very bad quality but its enough for show
http://onche.host56.com/var2.avi
i'll try to search again --


Last edited by ayks; 10/26/09 15:05.
Re: global var in function [Re: ayks] #295622
10/26/09 15:46
10/26/09 15:46
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi Ayks!

In SED use "find" to find all instances of jump in your code.

Look for the value that is given to jump.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: global var in function [Re: Ottawa] #295625
10/26/09 15:55
10/26/09 15:55
Joined: Sep 2009
Posts: 155
France
ayks Offline OP
Member
ayks  Offline OP
Member

Joined: Sep 2009
Posts: 155
France
reHi :Y

i often use this command and it sadly wont help me here since i have only those 4 "jump" and their values that i added at the end of the main wdl :x

Quote:
/////////////////////////////////////////////////////////////////
//INCLUDE <debug.wdl>; (end of the main code)

action inside
{
jump=30;
wait(500);
jump=20;
wait(500);
jump=75;
wait(500);
jump=9001;
}

(nothing after)


thx anyway but i think the jump just cant be changed during the game so better stop to search a solution :x



edit
just a last sad thing, i just tried to do exactly the same for movex like this :

action inside
{
movex=2;
jump=30;
wait(50);
movex=20;
jump=90;
}

first its like im super slow, and then megafast (in axe x), very cool and works perfect, but sadly jump don't want to work as well as movex frown


Last edited by ayks; 10/26/09 16:01.
Re: global var in function [Re: ayks] #295637
10/26/09 16:45
10/26/09 16:45
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Change jump
to
saute_un_peu

and try it again

The word jump is used in the engine.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Page 1 of 2 1 2

Gamestudio download | 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