Lua Scripts/Questions/Help
89 replies Thx DC, but i got another problem
When i equip it turn timer goes 5 sec, and when i attack i always recieve 100 dmg

When i equip it turn timer goes 5 sec, and when i attack i always recieve 100 dmg

edited 1×, last 23.10.10 10:02:24 am
yeah because this script doesn't make much sense at all
turn timer goes to 5 because you end the turn!
endturn (I guess you have set backing time to 5 sec?)
you receive 100 damage because of playerdamage(playercollision(),100)
playercollision() will always be 0 because you never check for collision. this is a big mistake. always use the collision command before using playercollision. 0 used as parameter in player commands is always a shortcut for the current player.
take a look at existing scripts and/or use the command reference.
collision
playercollision




playercollision() will always be 0 because you never check for collision. this is a big mistake. always use the collision command before using playercollision. 0 used as parameter in player commands is always a shortcut for the current player.
take a look at existing scripts and/or use the command reference.


DC has written:
turn timer goes to 5 because you end the turn!
endturn (I guess you have set backing time to 5 sec?)


somehow after equip and time set to 5 sec i can attack, lol

One question: Is the new commands in help, like "objectpush" and e.t.c. is for next version? And how many new commands will there be?
EDIT: Yes they are, I tested it now, and it is not working, so they will be added to new. Am I right?
EDIT: Yes they are, I tested it now, and it is not working, so they will be added to new. Am I right?
edited 1×, last 23.09.10 03:15:34 pm
yes, that's correct. some of the commands are not available yet but will be available for the next version.
I had my go at making a ropeshooter with a laser sight...
Didnt't work to well, I do believe everything should be fine, but every time I try to select it, and error appears:
"Lua Script Error:
Section: Weapon Draw (cc.ninjarope.draw)
scripts/Arnes/movement(Ninjarope.lua:38: bad argument #1 to 'drawinhand' (number expected, got nil)"
Here's the part of the code I've changed:
Didnt't work to well, I do believe everything should be fine, but every time I try to select it, and error appears:
"Lua Script Error:
Section: Weapon Draw (cc.ninjarope.draw)
scripts/Arnes/movement(Ninjarope.lua:38: bad argument #1 to 'drawinhand' (number expected, got nil)"
Here's the part of the code I've changed:

Look at the first argument of drawinhand, as the error says. There is gfx_wpn, but your images are only gfx_pro and gfx_icon. So, just change gfx_wpn in drawinhand cmd to gfx_icon!
Ok herez the thing I really suck at Lua so is it ok if ask you guys to script some weapons for me ?!?
My Eng. Suks so don't comment on my Gram. misstakes !!!
RULZ!

1.Its basically a poison air strike (or grenade)

2.Hairdryer just like "push" but has more range

3. Flotation device (water platform) make it so that is affected by wind and gravity

4.Desperado gun : ) standard machinegun

5.Liberty strike ... just like plain strike but its falls strait down not diagonally

I am interested to know if its possible to make a Extinguisher coz that wold be very usefull

2.Hairdryer just like "push" but has more range

3. Flotation device (water platform) make it so that is affected by wind and gravity

4.Desperado gun : ) standard machinegun

5.Liberty strike ... just like plain strike but its falls strait down not diagonally

I am interested to know if its possible to make a Extinguisher coz that wold be very usefull
My Eng. Suks so don't comment on my Gram. misstakes !!!
RULZ!

senar has written:
i want to edit 'Pistol' how can i make it shot evry 1 or 2 sec?
Just edit line with weapon_timer. There is:
weapon_timer=
and value. Edit that value, 50=1sec
@mumu
Extinguisher is possible, it's good idea, I'll make that

And your weapons:
1.thats so easy, I think I'll do it later.
2. Cool idea again, will make, I think tomorrow or today.
3. Don't know how to do that.
4. Thats very easy too.
5. That's not Plane strike, thats Anvil!
I've got the posionous pants covered
I have laready made sfx for it and everyhting, just need to finish the file off
EDIT: It's a about 75% done


EDIT: It's a about 75% done

edited 1×, last 06.10.10 05:09:05 pm
@Vectar666 use the raft script to make the flotation device.
owner of "Eagle mod" and "Survival Stories mod" and Halo Mod for stranded 2. Also make games, http://www.unrealsoftware.de/forum_posts.php?post=249591#jn
How to make sound, like "play_to_end->repeat" not like when its starts replaying after some seconds pass after play started.
sorry for mah english, dont know how to write what do i need in right way now

sorry for mah english, dont know how to write what do i need in right way now

how to make the weapon load the sound then after 1 sec shot?
(it loads the sound first for 1 sec then shot)
(it loads the sound first for 1 sec then shot)
Nemesis has written:
How to make sound, like "play_to_end->repeat" not like when its starts replaying after some seconds pass after play started.
sorry for mah english, dont know how to write what do i need in right way now

sorry for mah english, dont know how to write what do i need in right way now

That's so simple!
if


end