Hi everyone!
I was working under new px rr and found that those traps/turrets/weapons a very limited. But im bad at scripting, so tryed to understand how it works based on existing scripts by Zed, Enthuser, Undefined, Steps and others, who i found. And you know what? I think i understood a lot of thing, so now im presentimg you libs with a lot of modifications to enlarge possibilities for map-makers.
So in archive
Attachment:
File comment: include: Map, Scheme and Libs
NewAge_RopeRace_by_PyroMan.rar [2.49 MiB]
Downloaded 878 times
you will find a Map, Scheme, that needs in map, and Libs.
_
About libs:
1) pyroman_traps_sprites.pxlWith this lib u will get total control under game.
1st of all changes:
a) fixed problems with
checkpoints: Now if playing 6 players - no more non-working cp for 6th player. Also, no more no-sound notification for 1st checkpoint. It works now.
b) added teleportation sound for
teleport obj. Notice, that ALL sounds that i used in this teleport obj and in all other objects are loading directly from WormsArmageddon folders, not from lib.
c) for
Zone obj added new parameter: EachNFrame. So now no more skipped frames, that happens sometimes. Ofc u can set it anly when u need it. And default parameter is 5 NFrames, as it was without this parameter on.
d)
Trap now has two additional weapons: firework1 and firework2. They are actually modified weapons from New_Age_RopeRace_by_PyroMan.pxs scheme;
added some new parameters to traps:
-
ShootOnceNOW: weapon will be shoot immidietly as soon as Proximity zone reached. It shoots once. I widely used it in my NewAge roperace. With this parameter activated, Delay, Shoot dealy have no sence. As i used it widely, parameters about force, delay, etc are set as default to 1.
_
Ok so thats about modifications. Now
WHATS NEW:
1) object
Spriterz:
this is very useful obj for loading custom sprites. Its actually changed Zed`s ossom AddSpr lib, but.. what i found - is when u using more than 10-15 sprites (specially placed all over the map), game becomes extremely laggy. SO, in this case i decide to put this lib working with proximity Zones. I had troubles by making it as external lib, so its putted into this Lib (traps_sprites), where Zone object is exist.
So, as u can guess, it loads custom sprites from lib. I found, that sprites shoud have "rounded" numbers of pixels, for exmpl: 100x1000px, 200x100px, etc. Otherwise sprite will not work. Even if its 20x80, and u set FNum = 4, anim speed.. 10 - it will not work. But it will work if it will be 20x100 with just empty space and FNum 5.
Using this obj, u can set hundreds of sprites on map. And game will NO lag.
Now about parameters: a) SpriteName - name of png file in Lib (f.e. red_light.png)
b) Lock_X_axis (Lock_Y_axis) - this parameter i used for BlackZone on my map. This allows to lock sprite at specific Axis: X or Y. If "Lock_X_axis" selected, sprite will move with worm, butonly vertically. and if "Lock_Y_axis" selected, Sprite will move with worm only Horizontally.
c) MoveToWorm - in this case sprite will be attached to worm.
d) FrameNum - number of frames for sprite. for example for sprite 100x1000px it will be: 1000/100 = 10 frames.
e) AnimSpeed - speed 0-1000 to play sprite
f) ZPlane - this allows you to put sprite weather Before worm/landscape/other sprites or.. Behind. other words on top of view, or on bottom, like layers
g) PlayOnce - this parameter will play only one cicle of your sprite. If worm re-entered zone, sprite will play once again. etc
h) PlayBackwards - with this parameter choosed, sprite will load upwards and backwards, one by one. Of PlayBackwards and PlayOnce both choosed, srpite will play to last frame, then back to first frame and then will disable.
i) ProximityZone - zone obj that needs to activate sprite.
2) Object
WA_Spriter This object makes same function as SpriterZ, but sprites loading from WA existing. About spriteNumbers its nice to use PXSchemeEd and press button WA Sprites, to see what kind of sprites available and what numbers do they have. But its not the only function that this obj makes. It can also play WA sounds, by number. I tested them all, its 180 sounds, 126-180 of them - are speech sounds of current player. 1-126 - are sounds from DATA/Wav/Effects folder. I have a list of sound numbers and what they mean, but its written on paper. I will make a topic a lil later for this and put link here, so u will be able to know what Num is what sound.
So now about parameters:
a) SpriteNum - Number of WA sprite file (listed in PXSchemeEd.exe)
b) AnimSpeed - speed of playback. default is 15, works fine for most sprites.
c) ZPlane - this allows you to put sprite weather Before worm/landscape/other sprites or.. Behind. other words on top of view, or on bottom, like layers
d) RotationAngle - guess no comments required. I found that it would be nice to Flip sprites Hor/Vert, but i didnt found how to do it. So u can just rotate. Rotation works following the ClockWise.
e) Scale - make sprite larger/smaller in percentage.
f) PlayOnce - this parameter will play only one cicle of your sprite. If worm re-entered zone, sprite will play once again. etc
g) PlayBackwards - with this parameter choosed, sprite will load upwards and backwards, one by one. Of PlayBackwards and PlayOnce both choosed, srpite will play to last frame, then back to first frame and then will disable.
h) PlayWaSound - this allows you to play sound files, that i was talking about earlier. I recommend use it with PlayOnce parameter active.
i) ProximityZone - zone obj that needs to activate sprite.
3) Object
Tail:
its actually tRail.. but who cares. idea is same
it works same as WA_Spriter, but it adds a copies of spites each.. let me remeber... each 10 frames with remebered last position of worm. Number of copies: 10.
Here is parameters for this Obj:
a) SpriteNum - Number of WA sprite file (listed in PXSchemeEd.exe)
b) AttachToWorm - if its ON, then it will add additional sprite, attached to Worm. For example u can use 64`s sprite (BurningSheep) to attach to worm. In this way u`ll get butning sheep roping with a trail. To set this specific SpriteNumber to worm, made next function:
c) SNumToAttach - Sprite`s number to attach to worm. Works only with AttachToWorm parameter ON;
d) AnimSpeed - speed of animation for previous parameter;
e) ZPlane - u know...
f) ProximityZone - zone obj that needs to activate sprite.
4) Object
CrateSupplyZ:
This obj will allow you to supply a crate on map in specific area at specific moment. Also here is included
OilDrum supply, that can be
respawnable and self-destructing.
So here is available parameters:
a) CrateType - now it 3, against 2: Health Weapon OilDrum
b) Health - amount of health in crate if its Health-crate
c) CreateAtGStart - this will supply crate/drum at its place when game starts. If not selected - crate/drum will be supplied only when ProximityZone reached.
d) ClearEachTurn - if selected, crate/drum will be exploded when player will finish turn/loose control;
e) OilSnap - dunno what`s that. Found it in OilDrum function while creating. mb some1 will know whats that
f) ProximityZone - zone obj that needs to supply crate/oilDrum.
5) Object
CustomLibTask:
This obj will
allow you do ANYTHING on your map. With this function were made
conditions,
arrow shots, state changings like
freezing or killing, l
aunching fireworks,
adding time to turn-timer, and many-many others. The only problem - is that it all have to be specified in PXLedit.exe and for specific task - shoud be set a number. This number u can only set in map editor, set priximity zone for it and some other features. what kind? find it out now:
a) ObjTask - this is a number of your task, that you written in PXLedit.exe
b) MakeOnce - this will make work your task only once, when Zone reached. Usefull for launching some weapons or state changing
c) EachNFrames - this parameter reads how many times your task will be redone per frame. For example if u shooting weapons - EachNFrames will work as Delay for ya. If you changing state, this will work as delay to work when zone reached. etc
d) WeapGravity - this parameter allows you to control weapon`s gravity, that called from this obj. In my map i iften used 0 gravity for some weapons, to totally control their movement.
e) ProximityZone - zone obj that needs to make your task working.
This object has many hidden functions that work by calling not from MapEditor, but from LibraryEditor.
There are:
-
MakeArrow() need command to be sent for good working:
admg - damage,
ShootX - x position to shoot
ShootY - y position to shoot
ShootSX - power+XAngle for shot
ShootSY - power+YAngle for shot
gravArrow - gravity factor, float (f.e. 0.25)
noStick - bool, true or false.
- MakeWeaponShot() need command to be sent for good working:
weapNum (1, 2 or 3) if more than 3 - game will crash with ErrorLog. dunno why, it works so for each of listed functions.
ShootX, ShootY, ShootSX, ShootSY
w_grav - gravity factor
g_timer - delay for grenade
- MakeMine() need command to be sent for good working:
ShootX, ShootY, ShootSX, ShootSY, m_prefuse, m_flags, m_bias, m_damage, m_blastPower, m_fuse, m_radius, m_unknown
- MakeMissileShot() need command to be sent for good working:
weapNum (1, 2 or 3), ShootX, ShootY, ShootSX, ShootSY
w_targX, w_targY - to set Target position
- MakeSheepShot() need command to be sent for good working:
weapNum (1, 2 or 3), ShootX, ShootY, ShootSX, ShootSY, w_grav, ExplTimer - timer before explode
- MakeFirework() need command to be sent for good working:
weapNum (1, 2 or 3), ShootX, ShootY, ShootSX, ShootSY, w_grav, ExplTimer - timer before explode
- MakeFirework2() need same command to be sent for good working:
weapNum (1, 2 or 3), ShootX, ShootY, ShootSX, ShootSY, w_grav, ExplTimer - timer before explode
also this obj include some custom variables, that used by other obj to activate itself. One of this usage presented here:
6) object
Spriter_1by1:
this obj works as WA_spriter, but activates according to variables, that can be changed using CustomLibTask obj. I used it in my map, as last part of chamber 4, to open finish "doors". "BurningSheep" sprite loading one by one according to which zone has been reached.
__________________
well... so far so good. It was about one lib. Now about next libs
II.
pyroman_customgame.pxl Lib by Steps with changes by me
This lib overrides WA sprites.
- With this lib active your worm will be a
ninja-worm with ninja-rope I made a sprites for this. Saying ninja-worm i mean a worm with blue piece of... dunno how it called. as in dragon punch, on head. I decide to change it of step`s hats, coz its low amout of frames of his worms. It looked like a lil laggy for me, or smth. Only death animation was with higher frames, so it looks smooth and nice. so i keeped it
- Other thing that overrided - tcloud. I am a t-presser, so i was interested in this question. maybe some1 will find it a lil useless) anyway, now when u press T, u`ll see
WTFcloud. Now im working under multiple t-clouds.
- Another added thing -
"Meeee-eee" sheep sound that appears when you press "S". Just for fun
__________________
III, last one
pyroman_turretwell-known turret now a lil modified. Actually its added Auto-ballista (arow) turret to map editor. Also added a feature for it: leave arrows or not.
Here is more detailed info:
Object
ArrowTurret:
1) Invincible - weather can we kill it or not
2) Mounted - fixed X axis
3) AmmoPerTurn - no comments about)
4) LeaveArrows - leave arrows on map or no
I decide to add this function in tactical meanings. f.e. use turret to luck smth or so.
well another thing about this turret. I made it for my NewAgeRR, so the arrows speed is a lil low ) if some1 need, i can add possibility for arrow`s speed, grav, etc.
To play my map, u need all libs included in archive and set specific scheme "New_Age_RR_by_PyroMan.pxs" and one more thing... Have Fun!
___________
P.S.Waiting from you, fellaz, new schemes and maps. Hopefully my work will help you to look at worms armageddon and possible traps on it a lil wider than usual.