Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Stooq now requires an API key
by VHX. 06/08/26 20:14
ZorroGPT
by TipmyPip. 06/06/26 12:36
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 3,688 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Seraphinang, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
player problem #314727
03/10/10 16:06
03/10/10 16:06
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hi Folks,
Wonder if anyone can help:-
The player needs to rise up slowly (see script below), but it dosen't! I have tried replacing the 'z' with 'x' and 'y', and the player moves just fine. I have even made the 'height' values negative, and the player drops throught the floor as it should. BUT when I return the scrip to raise the player, it just bobs up and down a little!!! no where near the height it should go to.

Any ideas would be most welome.

The script:-


entity* ladder;

function climbing()
{
while(plbiped01_entity.z<400)
{
plbiped01_entity.z+=1*time;
wait(1);
}}


action climb
{
ladder=me;
my.enable_click=on;
my.event=climbing;
}

David

Re: player problem [Re: DAVIDMORETON] #314734
03/10/10 16:34
03/10/10 16:34
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Your code look correct, so my best guess is that you need to
disable the players "gravity" in the climbing function, and re-enable
when he's done.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: player problem [Re: EvilSOB] #314846
03/11/10 14:53
03/11/10 14:53
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Thanks EvilSOB for your reply. I have looked through the manual for 'gravity', but found nothing to do with C-Script, only LC.
However, I have solved the problem by placing an invisible wmb block at the foot of ladder on which the player must stand in order to trigger the lift op.(added it to the 'lift' code) Works OK.!
Now I must code for going up the ladder a step at a time, it's a little more real than just 'shooting up'. BUT, I understand that 'goto loops' are not acceptable any more, according to the latest manual - what say you?
Many thanks for your help.
David

Last edited by DAVIDMORETON; 03/11/10 15:51.
Re: player problem [Re: DAVIDMORETON] #314865
03/11/10 17:44
03/11/10 17:44
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
GOTO is evil ... more evil than me!

Look at the manual for "while()" loops and you'll see how it can
be like a goto loops but cleaner...
If you need more help, just ask...


Another thing, with the gravity, it aint going to be in the manual,
as I see you are using the templates.
Try putting a post in the templates section about the gravity issue.
Someone there should be able to help.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: player problem [Re: EvilSOB] #314940
03/12/10 10:52
03/12/10 10:52
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Thanks EvilSOB for your reply and help. Am now using 'continue' instead of 'goto' - after a lot of fidling about with the'{}' !!! Have asked the question in 'templates' about gravity, let's see if I get lucky.
David


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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