Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Slow down cog
Slow down cog
2000-10-20, 7:51 AM #1
I need a COG that slows down JK, keeps Kyle at his regular speed and doesn't alter the framerate. Email me rather than reply

jaggedconscience@hotmail.com


Thanx in advance

------------------
You were right anout one thing master, the negotiators were short!
2000-10-21, 5:13 AM #2
you mean: a cog that slows down enemies, doors etc...?!?
this would be quite hard to do, and would only work in special levels. You would have to change all ai-cogs and door/elevator cogs, so that there is an if condition, that checks if the slowmo is active or not, then if yes, divide the speed or multiply the time in the movement commands.
Another way to make the enemys slower: ParseArg their templates with a lower speed value...
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2000-10-21, 9:30 AM #3
OK i am not sure abo0ut this but is there a a flag that can make things slow down like in slow mo. Then you would just need to sst that using SetActorFlags or something like that and then send a message saying ClearActorFlags(player,xxxxx);
xxxxx=flag number
i am not sure about this at all hey how about i check if there is a slow mo flag i don't see one so you would probably have to do what zagibu said
roses are red, violets are blue, I am schizophrenic, and I am too!
2000-10-21, 9:54 AM #4
ok i did think of something that could work use SetActorExtraSpeed(victim, -xxxx);
-xxxx=the number that you want the enemy to slow down like make it SetActorExtraSpeed(player, -9.47); that should work, can anyone confirm my idea?
roses are red, violets are blue, I am schizophrenic, and I am too!
2000-10-21, 12:21 PM #5
I guess there is nothing for the code "slowmo" unfortunately.
If you want to do this, you must control every bits of things that has a chance of moving, which are enemies, doors, crates, conveyers whatever etc.

From a single cog, you must send a trigger to change a variable on all those cogs (except for the enemies which can be handled from that single cog to all enemies) to move slower, so you have to have your own level with special cogs for each stuff in level.

SendTrigger(-1, 0, 0, 0, 0, 0);

in each cogs, for example for a door

activated:

MoveToFrame(door, 1, speed);


trigger:

speed = 4;

return;

Where as speed was 8 or something in the first place.

Or, you can use a bin in the items.dat and change and use it.

SetInv(player, 116, 4);

in the door cog

activated:

moveToFrame(door, 1, GetInv(player, 116));

whereas the bin 116 was set to 8 in the first place.

As for enemies, use this

Code:
for(i=0; i<=GetSectorCount(); i++)
{
    z = FirstThingInSector();

    while(z != -1)
    {
          if(GetThingType(z) == 0x4) SetAiMoveSpeed(z, 0.5);
           z = NextThingInSector(z);
    }
}


SetAiMoveSpeed or AiMoveSpeed, I forgot.
And the thing type for enemies was if I remember correctly, it is 0x4, but could be something different.

------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited October 21, 2000).]

↑ Up to the top!