PDA

View Full Version : [WormKit] Longer turn time for specified weapon


Gibol
22 Apr 2009, 22:34
How to set turn time for one weapon only?
For ex. i'm playing with modified weapons by PXschemeEditor and turn time is 15s, but i want to set time for using super grider for 2 or even infinity.
So is there a way of doing this by script i px or something?

I hope that u understand what i mean :)

It would be very useful for me, thx :)

Entuser
23 Apr 2009, 05:38
It is possible only with script. Copy following code to Scripts->Edit dialog :


var
GotNewSeconds : boolean;

procedure InitHooks;
begin
RegisterHook('OnFire', ON_FIRE);
RegisterHook('OnTurn', ON_TURN_BEGIN);
end;

procedure OnTurn;
begin
GotNewSeconds := false;
end;

function OnFire : boolean;
var
CurWorm : TWorm;
begin
CurWorm := TWorm(GetTekWormObj);
if CurWorm = nil then exit;
if CurWorm.SelWeapon.WT = 1 then begin //index of weapon table
if CurWorm.SelWeapon.WN = 36 then begin //grider index
if not GotNewSeconds then begin
GotNewSeconds := True;
TurnTimer := 30000; //new turn timer in milliseconds
end;
end;
end;
Result := True;
end;

It will set remain seconds to 30 when player using super-grider. Or I understood you incorrectly? :)

b1llygo4t
23 Apr 2009, 08:30
would everyone have to be using this to play online, and were do you put it?

Entuser
23 Apr 2009, 09:05
Clients must have PX. Host should make new PX scheme in pxSchemeEditor, and paste this script into Scripts->Edit window

b1llygo4t
23 Apr 2009, 09:16
what is pxSchemeEditor?

franpa
23 Apr 2009, 09:35
scripting tool for real time worms

Entuser
23 Apr 2009, 09:37
what is pxSchemeEditor?
Program for schemes making, what comes with Project X. didn't you see it?

b1llygo4t
23 Apr 2009, 10:41
i havnt used project x yet. im sure im missing out

Gibol
23 Apr 2009, 11:00
I dunno what im doing wrong, but it's not working at all. I paste it to script window, on my scheme and in new scheme, but both don't work, time is not extending.

Entuser
23 Apr 2009, 13:39
time should extend to 30 msec after placing a first super grider... i checked it and script is working at my computer. can you upload compressed pxlog.txt?


scripting tool for real time worms

Not for realtime, only for "classical" turn-based Project X, and it is available to public on worms-px.ru

Gibol
23 Apr 2009, 21:17
here it is

Entuser
24 Apr 2009, 14:14
I didn't see any errors in pxlog. Can you also upload a replay?

Gibol
29 Apr 2009, 19:02
replays...

b1llygo4t
2 May 2009, 05:26
so to play a regular game of worms you have to remove the px from wa?

Gibol
2 May 2009, 12:56
so to play a regular game of worms you have to remove the px from wa?

No, when i want to play normal i launch worms from wa.exe. When i want to use PX i launch from wormkit.exe

Gibol
10 Jul 2009, 22:15
Hi all again...
I see that nothing new in my case...

Noone can check it 4 me again, plz ?

Entuser
12 Jul 2009, 14:21
I found bug in some versions of PX, related to global game variables (in this script it is TurnTimer ). Wait for new version of PX with new scripting engine, that will be released after RTW