Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Ayumi, Akow, AndrewAMD), 1,505 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Wy does "time_factory" don`t work? #289763
09/15/09 12:59
09/15/09 12:59
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
Wy does nothing happen there?

action blade()
{
while (!player) {wait (1);}
while (vec_dist (player.x, my.x) > 1000)
{
time_factor = 0.1;
}
wait (1);
}


I have know Gamestudio/A7 Commercial Edition 7.84
Re: Wy does "time_factory" don`t work? [Re: Blackchuck] #289766
09/15/09 13:33
09/15/09 13:33
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Why should anything happen? If the player's far away from the blade, time_factor gets set to 0.1.

After that, it never gets set back to 1. But that's not the main problem: the main problem is that you haven't given us any info.

What do you expect to happen? Why do you expect that to happen? What other relevant code do you have? Why didn't you use the [code] tags? Stuff like that.

Cheers,

Jibb

EDIT: Good point, Xarthor. Blackchuck: If your program never crashed, then the player was never more than 1000 quants away from the blade.

Last edited by JulzMighty; 09/15/09 13:38.

Formerly known as JulzMighty.
I made KarBOOM!
Re: Wy does "time_factory" don`t work? [Re: Blackchuck] #289768
09/15/09 13:35
09/15/09 13:35
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Maybe because your wait(1) is not in the while loop?
Code:
action blade()
{
  while (!player) { wait (1); }
  while (vec_dist (player.x, my.x) > 1000)
  {
    time_factor = 0.1;
    wait(1);
  }
}



Re: Wy does "time_factory" don`t work? [Re: JibbSmart] #289772
09/15/09 13:43
09/15/09 13:43
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
I made a code that a blade moves to the player very fast.
and with a timefactor it`s cooler.


I have know Gamestudio/A7 Commercial Edition 7.84
Re: Wy does "time_factory" don`t work? [Re: Blackchuck] #289774
09/15/09 14:01
09/15/09 14:01
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Yes, I'm sure it is. But what isn't happening? You asked "Why does nothing happen"? Without telling us what's meant to happen. Showing us some code doesn't count as an explanation, because if it's not doing what you want, then the code is wrong, and so the code can't tell us what you want either. Did you make the change Xarthor mentioned so you don't freeze in an infinite loop?

When you seek help you need to be clear. I'll assume it's meant to make everything slow down when the blade is within 1000 quants of the player. But you haven't shown us your other code. Do you know how time_factor works?

Nothing will slow down if you don't multiply their speeds by time_step.

I don't want to put you down at all. I really want to be helpful. So please make your questions clear and show people what your problem is, what you're expecting, why you're expecting it, and relevant code (in [code] tags).

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Wy does "time_factory" don`t work? [Re: JibbSmart] #289776
09/15/09 14:21
09/15/09 14:21
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
i guess he meant


while (vec_dist (player.x, my.x) < 1000)

instead of

while (vec_dist (player.x, my.x) > 1000)


3333333333
Re: Wy does "time_factory" don`t work? [Re: Quad] #289996
09/16/09 17:17
09/16/09 17:17
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
Oh, thank you Quadraxas.
I whant that everithing slows down, aslong that the player is near the blade, also;
"while (vec_dist (player.x, my.x) > 1000)"
But wenn my player is in reach, noching happens.


I have know Gamestudio/A7 Commercial Edition 7.84
Re: Wy does "time_factory" don`t work? [Re: Blackchuck] #289999
09/16/09 17:20
09/16/09 17:20
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
this means outside of the range: while (vec_dist (player.x, my.x) > 1000)

you need to use "<"

make sure you are close enough. and make sure you are using time_step for movements.


3333333333
Re: Wy does "time_factory" don`t work? [Re: JibbSmart] #290054
09/17/09 02:29
09/17/09 02:29
Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Nowherebrain Offline
Serious User
Nowherebrain  Offline
Serious User

Joined: Jul 2005
Posts: 1,002
Trier, Deutschland
Originally Posted By: JulzMighty
Yes, I'm sure it is.

That made my day....excuse me, low blood sugar.


Everybody Poops.
here are some tutorials I made.
http://www.acknexturk.com/blender/
Re: Wy does "time_factory" don`t work? [Re: Quad] #290158
09/17/09 15:40
09/17/09 15:40
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
Now it`s the hole time in slow motion, even when my player is out of range.


I have know Gamestudio/A7 Commercial Edition 7.84
Page 1 of 2 1 2

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

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