Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,574 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Wy does "time_factory" don`t work? [Re: Blackchuck] #290174
09/17/09 16:17
09/17/09 16:17
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
you have to write it so:
Code:
action blade()
{
while (!player) {wait (1);} 
while(1)
{
if (vec_dist (player.x, my.x) < 1000) 
{
time_factor = 0.1; 
}
else time_factor = 1;
wait (1); 
}
}



Please laugh!

Re: Wy does "time_factory" don`t work? [Re: Blackchuck] #290176
09/17/09 16:19
09/17/09 16:19
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Thats because you do not reset it to a normal value of 1
Try this:
Code:
action blade()
{
  while (!player) { wait (1); }
  while(me)
  {
    if(vec_dist(player.x,my.x) < 1000) // play with 1000
    {
      time_factor = 0.1;
    }
    else
    {
      time_factor = 1; // reset to normal value if player out of range
    }

    wait(1);
  }
}



Now a problem may arise if you have more blades in your level that are that far away from each other that, if the player is in range for blade A he is out of range of blade B, thus blade B and blade A will "fight" around the time_factor and if you are lucky the time goes to slow motion, if not then its always constantly "normal".

If you want to control more blades with this code which can be far way from each other, then you need a different approach.
Just say a word and someone will help you.

edit:
Damn I was too slow wink

Last edited by Xarthor; 09/17/09 16:19.
Re: Wy does "time_factory" don`t work? [Re: Xarthor] #290309
09/18/09 11:25
09/18/09 11:25
Joined: Jul 2009
Posts: 150
B
Blackchuck Offline OP
Member
Blackchuck  Offline OP
Member
B

Joined: Jul 2009
Posts: 150
hehe, no problem Xarthor and thanks Rei_Ayanami, it works now how I whant it.

But were did you lerned to script so muth detalis?


I have know Gamestudio/A7 Commercial Edition 7.84
Re: Wy does "time_factory" don`t work? [Re: Blackchuck] #290337
09/18/09 14:38
09/18/09 14:38
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Mh, i didn´t learned it, it´s just logical^^ - i think about a problem, maybe i make a picture of what - than i just program grin!

Page 2 of 2 1 2

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