Forum

> > CS2D > Scripts > event
Forums overviewCS2D overview Scripts overviewLog in to reply

English event

14 replies
To the start Previous 1 Next To the start

old event

nvdie
User Off Offline

Quote
Hi, here I am again needing another script that has 5 random events, the events are

Standard: m4a1 and deagle
Winter: 10 snowballs
Bomberman: 5 HE grenades
Jason: machete and chainsaw
Doge: claw

Note: each event should not restart rounds
Note: all events should display on-screen messages
Note: every event should equip all players

Messages:
Standard: wow standard mode
Bomberman: bomberman
Jason: jason is here!
Doge: wow such doge

All in white in the center of the screen

old Re: event

Rainoth
Moderator Off Offline

Quote
This one's pretty easy. Lets let him do it by himself and if he has problems we'll give him some tips ^,^

old Re: event

Waldin
User Off Offline

Quote
user Rainoth has written
This one's pretty easy. Lets let him do it by himself and if he has problems we'll give him some tips ^,^

pls no

More >


i hope you understod it, not tested so it can have some problems

old Re: event

Yates
Reviewer Off Offline

Quote
user Rainoth has written
This one's pretty easy. Lets let him do it by himself and if he has problems we'll give him some tips ^,^

I stopped replying to these threads because no one listened.

You will always have people who will want to show off their coding skills but don't realize the OP only cares for his own sake and will keep on asking other questions and totally forget who helped him.

old Re: event

nvdie
User Off Offline

Quote
@user Waldin: It does not work
@user Rainoth: I do not understand anything about script, I do not even know what END is,

old Re: event

OutstandingPP
BANNED Off Offline

Quote
user Rainoth has written
This one's pretty easy. Lets let him do it by himself and if he has problems we'll give him some tips ^,^


really ? if he need help we will help him, when we give him the script codes he will learn step by step and he will learn script in short time, but when we let him do it by his self and read to learn he will need long time to learn, i know he need to read to learn but thats don't mean we don't have to help him to make his own script

hope you understand what did i said

old Re: event

Bowlinghead
User Off Offline

Quote
@user OutstandingPP:
If you see the whole script and you dont know anything about Lua, you`ll learn nothing.
As you said, he´d have to learn step by step, so he needs simple tasks.
Anyway maybe the autor doesnt even want to learn Lua.

@user nvdie: When should these events trigger? Should the event give all alive players weapons or also players that spawn after the event happens in the same round?

old Re: event

OutstandingPP
BANNED Off Offline

Quote
@user Bowlinghead:
well i know that but i love learn like this
download lua
editing it
learning from editing it

i don't love reading anyways
i just love learn from downloading editing then i learn from editing the .lua file

well but i didn't say i didn't read to learn lua

i read some times and editing some times and asking for help in unrealsoftware.de some times
this is the best way for me to learn

old Re: event

nvdie
User Off Offline

Quote
@user Bowlinghead: Events should be triggered randomly and this should give guns to alive players

Standard: m4a1 and deagle
Winter: 10 snowballs
Bomberman: 5 HE grenades
Jason: machete and chainsaw
Doge: claw

Note: each event should not restart rounds
Note: all events should display on-screen messages
Note: every event should equip all players

Messages:
Standard: wow standard mode
Bomberman: bomberman
Jason: jason is here!
Doge: wow such doge

All in white in the center of the screen

I would like to learn lua script

old Re: event

Rainoth
Moderator Off Offline

Quote
@user Waldin: Either a) you're underestimating his potential or b) you think progress is a bad thing. Pls yes
@user Yates: I try to help a lot since it refreshes my memory on how to use lua and I sometimes pick up neat stuff or get ideas while helping.
@user nvdie: Read a guide and you'll know the basics. You need to know basic math functions and elementary understanding of basic logic to program. This isn't rocket science until you're trying to program a rocket. An end means just that - an end to something.
@user OutstandingPP: I find that wrong. Sure, I learned everything from examples myself but I reached a point where I needed an explanation. Then I bother Engy until he taught me the majority of what he knows. So yes, it's a good start but even better is when you get an explanation. If we just give code like user Waldin did, he'll use it and we won't know if he bothered to learn how it works or not. We need to know he's trying and the best way to show that he is - write code himself and post it here. We'll explain his mistakes and he'll learn. Editing scripts won't get you far. I never said we should just leave him for dead and ignore him. Your post appears to imply that I said we should.

old Re: event

THEMUD
User Off Offline

Quote
user Rainoth has written
it refreshes my memory on how to use lua and I sometimes pick up neat stuff or get ideas while helping.

I double that and it puts me in the mood of having a task to finish. It also gives me the joys of helping a person in coding.

@user nvdie: If you are really willing or desiring to take a part in Lua programming, you can check out free courses online like: Lua Tutorial and TutorialsPoint Lua Course.

Back to your request, try this code below and tell if it's not what you need and/or you found a bug in it.
More >

old Re: event

Bowlinghead
User Off Offline

Quote
@user nvdie:
Randomly? Of course, you already wrote it.

I mean like: does it trigger randomly while the round is going? Can it also trigger at the start of the round?
Can 2 (or more) events occure on the same round?
How high is the chance that an event occur?

How often can an event occure?
Like: After the event occured, do you have a rule like "the next 5 rounds dont have any event"?

Etc. etc.

Programing/Scripting is not any magic - you cant tell the program "do it how you like".

@user OutstandingPP:
You can learn from examples, I wouldnt suggest it (when you start from nothing). For example, you only know the for loop so you use it only, but a while loop might be the better choise (not the best example tho). Or you declare all variables as global which isnt efficient.

old Re: event

nvdie
User Off Offline

Quote
@user Bowlinghead: ty bro but I already have the script
@user THEMUD: I've totally edited your script, before the events were together but now it's every 10 rounds this is a good start for me.
edited 1×, last 17.01.17 06:12:50 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview