Jump to content

Help With a Slow-Time Script


WarRatsG

Recommended Posts

As the title suggests, I'm trying to make a spell that slows time. I'm using the command 'Con_SetIniSetting "fGlobalTimeMultiplier:General" ' to do this, although it seems to have no effect within spells, so I'm in the process of trying out tokens.

 

I've used "New Bullet Time" by Skingrad24 as a reference to get the idea, so I know each of these commands work.

Link to comment
Share on other sites

Are you sure that it has no effect within spells? I'm assuming that your spell is something like:

 

scn spellscript

Begin ScriptEffectStart

Con_SetIniSetting "fGlobalTimeMultiplier:General" 0.5

End

Begin ScriptEffectFinish

Con_SetIniSetting "fGlobalTimeMultiplier:General" 1.0

End

 

Maybe you just forgot to set a duration for the script effect?

Link to comment
Share on other sites

I tried something like that before, and it did work. But when there was some code involving increasing weapon speed, but while the weapon was faster the game wouldn't slow down.

 

Also I found that one time I got it to work, Menus would also appear extremely slowly. So consulting "New Bullet Time" revealed that Skingrad24 used a token that had a Begin GameMode block that slowed the game Every frame and a Begin MenuMode block that set speed to 1. Simple enough I thought, but there was still a few problems.

 

I'm sure I there is a small but blatant error that is staring me in the face. I'll keep trying - 90% of what I do is failed attempts, the other 10% is the result of constant prodding and tweaking, one line at a time.

 

As of now, I think it is because I am setting the speed with a saved variable (the spell is upgradeable) that there are problems. What I will do when I come back to it is make individual Scripts and/or tokens for each level of the spell. That way I won't need to use a stored variable.

 

Also i found out that you should never set the speed to 0 :L

Link to comment
Share on other sites

There can't be a conflict because Skingrad24 managed it. I think the key is he set the time multiplier every frame instead of just once. Thing is, he did it with a quest and a token, no magic. I'm going to try something like:

 

Scn SlowtimeSpell

Begin ScriptEffectStart
    Player.AddItemNS SlowTimeToken
    Player.EquipItemNS SlowTimeToken
End

Begin ScriptEffectEnd
    Player.UnEquipItemNS SlowTimeToken
    Player.RemoveItemNS SlowTimeToken
    Con_SetIniSetting "fGlobalTimeMultiplier:General" 1
End

 

Scn SlowTimeToken

Begin OnEquip
;;;Set new Weapon Speed
End

Begin OnUnEquip
;;;Reset weapon speed.
End

Begin GameMode
    Con_SetIniSetting "fGlobalTimeMultiplier:General" 1
End

 

If I mess around with something along those lines, I think I can get it to work.

Link to comment
Share on other sites

From reading the file description, I think what was done is:

 

1. set "X" as a multiplier for global time (set global time to default/X)

2. use X as multiplier for move speed (set fMoveCharWalkMin to default*X)

3. create and equip a cloned weapon with weapon speed multiplied by X (SetWeaponSpeed default*X)

Link to comment
Share on other sites

Yes it uses a "Bullet Time Multiplier", which factors into the time multiplier, the enchantment set on the token (which fortifies speed) and the weapon speed. It's all supposed to make you move as fast as you normally do, but everyone else moves a lot slower.
Link to comment
Share on other sites

Ok for the record, I think I have worked out all the kinks. Now it's just a matter of preference - deciding how much of an effect I want.

 

For those who are interested, I used a combination of spell and token:

The spell does the heavy work, it adds the token and increases the weapon speed. When the spell finishes the token and faster weapon are removed.

The Token has a GameMode block with just 1 line, which sets the time multiplier to the desired speed. It also has a MenuMode block also with 1 line, which sets it back to normal speed. This is so that Menus don't take a long time to load up, especially if the time multiplier is extremely low. I messed around with having it at 0.01 - needless to say, it takes about 5 minutes to load 1 menu, but fighting is unbelievably cinematic :L

 

Now it would be interesting to figure out a way to make a toggle instead of a short duration spell. Skingrad24 accomplished this with another token, which simply removes all the effects manually, however I think I could just pawn this off as "unbalancing" and save myself the trouble for another day.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...