3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Wy does "time_factory" don`t work?
#289763
09/15/09 12:59
09/15/09 12:59
|
Joined: Jul 2009
Posts: 150
Blackchuck
OP
Member
|
OP
Member
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
JibbSmart
Expert
|
Expert
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: JibbSmart]
#289772
09/15/09 13:43
09/15/09 13:43
|
Joined: Jul 2009
Posts: 150
Blackchuck
OP
Member
|
OP
Member
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
JibbSmart
Expert
|
Expert
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
Senior Expert
|
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
Blackchuck
OP
Member
|
OP
Member
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
Senior Expert
|
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: Quad]
#290158
09/17/09 15:40
09/17/09 15:40
|
Joined: Jul 2009
Posts: 150
Blackchuck
OP
Member
|
OP
Member
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
|
|
|
|