English Lua Scripts/Questions/Help

89 replies
Goto Page
To the start Previous 1 2 3 4 5 Next To the start
29.08.10 11:29:21 am
Up
DC
Admin
Offline Off
"==" is equality in Lua! "~=" inequality
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
29.08.10 11:52:34 am
Up
Nemesis
User
Offline Off
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
29.08.10 01:36:02 pm
Up
DC
Admin
Offline Off
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
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
29.08.10 02:20:40 pm
Up
Nemesis
User
Offline Off
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
20.09.10 02:11:09 pm
Up
Vectarrio
User
Offline Off
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
23.09.10 03:30:18 pm
Up
DC
Admin
Offline Off
yes, that's correct. some of the commands are not available yet but will be available for the next version.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
05.10.10 07:54:52 am
Up
Arne
User
Offline Off
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 >
IMG:http://img17.imageshack.us/img17/2595/16237.gif
05.10.10 07:58:51 am
Up
Vectarrio
User
Offline Off
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!
05.10.10 02:59:03 pm
Up
Arne
User
Offline Off
Can't believe it was that simple... x_x thanks alot anyways!
IMG:http://img17.imageshack.us/img17/2595/16237.gif
06.10.10 10:59:09 am
Up
Mumu
User
Offline Off
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 !!! IMG:http://www.walkover.org/files/walkbutton.gif
RULZ!
06.10.10 02:20:34 pm
Up
Vectarrio
User
Offline Off
I can script something for ya.
06.10.10 02:53:54 pm
Up
Mumu
User
Offline Off
1.Its basically a poison air strike (or grenade)
IMG:http://i55.tinypic.com/2nsytfo.png

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

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

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

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

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 !!! IMG:http://www.walkover.org/files/walkbutton.gif
RULZ!
06.10.10 03:01:00 pm
Up
senar
User
Offline Off
i want to edit 'Pistol' how can i make it shot evry 1 or 2 sec?
06.10.10 03:26:42 pm
Up
Vectarrio
User
Offline Off
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!
06.10.10 03:47:37 pm
Up
DannyDeth
User
Offline Off
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
07.10.10 07:30:29 am
Up
UnIdEnTiFiEd
User
Offline Off
@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
09.10.10 09:17:35 am
Up
Nemesis
User
Offline Off
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
09.10.10 09:32:16 am
Up
senar
User
Offline Off
how to make the weapon load the sound then after 1 sec shot?
(it loads the sound first for 1 sec then shot)
09.10.10 01:40:16 pm
Up
Vectarrio
User
Offline Off
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