Forum

> > Carnage Contest > Lua Scripts/Questions/Help
Forums overviewCarnage Contest overviewLog in to reply

English Lua Scripts/Questions/Help

89 replies
Page
To the start Previous 1 2 3 4 5 Next To the start

old Re: Lua Scripts/Questions/Help

Nem
User Off Offline

Quote
Thx DC, but i got another problem
More >


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

old Re: Lua Scripts/Questions/Help

DC
Admin On Online

Quote
yeah because this script doesn't make much sense at all

> turn timer goes to 5 because you end the turn!
cc cmd 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.
cc cmd collision
cc cmd playercollision

old Re: Lua Scripts/Questions/Help

Nem
User Off Offline

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

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

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
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?
edited 1×, last 23.09.10 03:15:34 pm

old Re: Lua Scripts/Questions/Help

DC
Admin On Online

Quote
yes, that's correct. some of the commands are not available yet but will be available for the next version.

old Re: Lua Scripts/Questions/Help

Arne
User Off Offline

Quote
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:
More >

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
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!

old Re: Lua Scripts/Questions/Help

Mumu
User Off Offline

Quote
1.Its basically a poison air strike (or grenade)
IMG:https://i55.tinypic.com/2nsytfo.png

2.Hairdryer just like "push" but has more range
IMG:https://i53.tinypic.com/2n0sahw.png

3. Flotation device (water platform) make it so that is affected by wind and gravity
IMG:https://i56.tinypic.com/md09z6.png

4.Desperado gun : ) standard machinegun
IMG:https://i53.tinypic.com/2mexrts.png

5.Liberty strike ... just like plain strike but its falls strait down not diagonally
IMG:https://i52.tinypic.com/huep83.png

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

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
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!

old Re: Lua Scripts/Questions/Help

DannyDeth
User Off Offline

Quote
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
edited 1×, last 06.10.10 05:09:05 pm

old Re: Lua Scripts/Questions/Help

Nem
User Off Offline

Quote
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

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
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

That's so simple!

if cc cmd channelplaying (channel)==0 then
cc cmd playsound (snd, the same channel)
end
To the start Previous 1 2 3 4 5 Next To the start
Log in to replyCarnage Contest overviewForums overview