Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2011-05-10 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: [Tutorial] Basic Coding Concept.  (Read 5826 times)

RMCommando

  • Level 0 Beginner
  • Posts: 15
  • <3 MUERTE FOR EVER AND EVER!!
Re: [Tutorial] Basic Coding Concept.
« Reply #15 on: January 18, 2011, 04:12:31 AM »
Hi all,

Im a member of the C.c.C clan that many of you know is lead by la muerte :)

Im going to be coding all our clans wcs servers races but there is one problem, I am a complete noob at coding and have never done it before. So im going to probably have quite a few questions which I hope you all will be able to help me with :) Im just going to read through all these tutorials first.

Just thought id introduce myself :D


Predz

  • Level 5 Trained Intermediate
  • Posts: 103
  • Creating the WC:S Elements League.
Re: [Tutorial] Basic Coding Concept.
« Reply #16 on: January 18, 2011, 04:34:20 PM »
Good to see a "new face"... Welcome

AvasT

  • Brazilian
  • Watchdog
  • Level 7 Expert
  • Posts: 1296
  • Ride BMX!
Re: [Tutorial] Basic Coding Concept.
« Reply #17 on: January 30, 2011, 12:49:17 PM »
You can ask anything, but please, don't be boring like the Brazilian guys, they are the main reason why i'm always in bad mood.




Quote
Never tell your password to anyone.
23:51 - MiB: Hi wife
23:51 - MiB: Imma slap you since you been naughty
23:51 - AvasT: Hi husband
23:51 - AvasT: Sure, on my ass
23:51 - MiB: Imma slap you with my big stick!
23:51 - AvasT: Ok
23:52 - MiB: *-*

TheChris2206

  • Level 0 Beginner
  • Posts: 3
  • <3 WCS :)
Re: [Tutorial] Basic Coding Concept.
« Reply #18 on: March 20, 2011, 09:22:40 AM »
hi guys
i Tried RPG before it is also nice but its goin very fast boring
WCS is alot better because you have nearly infinite possibilities wcs
if you want i would like to translate this tutorial and other too by request in german. :)



AmaTeK

  • Level 5 Trained Intermediate
  • Posts: 113
  • <3 WCS :) Oh Yeah !! I like it
Re: [Tutorial] Basic Coding Concept.
« Reply #19 on: March 30, 2011, 05:30:45 PM »
I have not found in the tutorial, how to limit the number of race on the server, example: only 1 race "predator", only 1 race "spiderman"
Is this possible?
Sorry for my English, I'm French !! ^^

RedNäck

  • Level 7 Expert
  • Posts: 268
  • In a golden Fever/HAPPY
Re: [Tutorial] Basic Coding Concept.
« Reply #20 on: March 31, 2011, 09:09:46 AM »
yes it is, make only spiderman and only predator in your race.ini and than you have them only


Du suchst einen guten Server?
http://www.server-junkys.de
ist da die perfekte Adresse

WCS = AWESOME
Minecraft =AWESOME
Eventscripts for Minecraft = ADORABLE
Minecraft + WCS = a lot Work to do

AmaTeK

  • Level 5 Trained Intermediate
  • Posts: 113
  • <3 WCS :) Oh Yeah !! I like it
Re: [Tutorial] Basic Coding Concept.
« Reply #21 on: March 31, 2011, 10:33:49 AM »
I'm sorry but I did not understand your answer, maybe I expressed myself badly.

how to limit the number of people having the same race?
Sorry for my English, I'm French !! ^^

Aenima

  • Level 5 Trained Intermediate
  • Posts: 101
  • Learn to Swim !
Re: [Tutorial] Basic Coding Concept.
« Reply #22 on: April 30, 2011, 12:47:31 PM »
i do have questions about the "roundstartcmd" key :

when i use general commands in it (like the es_msg used in the example) everything work,
but if i use a command with a userid nothing happens,
ex:
roundstartcmd = "es_tell server_var(wcs_userid) #green blabla"     NOT working
roundstartcmd = "es_msg #green blabla"     works
roundendcmd = "es_tell server_var(wcs_userid) #green blabla"     works


is this a bug or am i doing something wrong ?


oh and Amatek: i think La Muerte is working on teamlimit for the next release, but it should limit for each team, not for the whole server
« Last Edit: April 30, 2011, 12:49:32 PM by Aenima »

Kamiqawa

  • Level 7 Expert
  • Posts: 264
Re: [Tutorial] Basic Coding Concept.
« Reply #23 on: April 30, 2011, 01:25:43 PM »
Hi,

It seems that you are using server_var(wcs_userid) as a userid, which is NOT a "real" userid. It's only made for player_ultimate styled custom event, which doesn't have event_var(userid) available on it.

Sorry, my bad, ofc there is NOT any userid on round start event, because there is no player starting it... well didn't think about it :S Sorry :>
« Last Edit: April 30, 2011, 03:31:53 PM by Kamiqawa »

Aenima

  • Level 5 Trained Intermediate
  • Posts: 101
  • Learn to Swim !
Re: [Tutorial] Basic Coding Concept.
« Reply #24 on: April 30, 2011, 01:37:44 PM »
thats what i thought at first but it doesnt work at all when using event_var(userid)

on the "roundstartcmd" key nothing seems to work for me,
and on the "roundendcmd" key it only works when using server_var(wcs_userid)



roundstartcmd = "es_tell server_var(wcs_userid) #green blabla"     NOT working
roundstartcmd = "es_tell event_var(userid) #green blabla"     NOT working
roundendcmd = "es_tell event_var(userid) #green blabla"     NOT working
roundendcmd = "es_tell server_var(wcs_userid) #green blabla"     works

roundstartcmd = "es_msg #green blabla"    works
roundendcmd = "es_msg #green blabla"    works
« Last Edit: April 30, 2011, 02:08:59 PM by Aenima »

Kamiqawa

  • Level 7 Expert
  • Posts: 264
Re: [Tutorial] Basic Coding Concept.
« Reply #25 on: April 30, 2011, 03:31:41 PM »
Sorry, my bad, ofc there is NOT any userid on round start event, because there is no player starting it... well didn't think about it :S Sorry :>

So what you should do to get a private message there would be set a hmm.. custom user variable on player_spawn (spawncmd) and then message to it, but with multiple users that would have problems, so... Dunno, use msg or try something else.

Sorry & Thanks..

Aenima

  • Level 5 Trained Intermediate
  • Posts: 101
  • Learn to Swim !
Re: [Tutorial] Basic Coding Concept.
« Reply #26 on: April 30, 2011, 04:14:35 PM »
aah, thx Kamiqawa :)
in fact, i was trying to set a wscgroup var back to 0 when a new round starts, using this var to allow a player to respawn only once a round ... so im gonna try to find another way to do it

but i still wonder why server_var(wcs_userid) doesn't work in "roundstartcmd" while it does work in "roundendcmd"   ???

Kamiqawa

  • Level 7 Expert
  • Posts: 264
Re: [Tutorial] Basic Coding Concept.
« Reply #27 on: April 30, 2011, 05:10:56 PM »
Wut, how can global event get a userid? :D I bet the message doesn't show up on right person: it appears on player who used ultimate last time or something. But yes, those are "global" events, you can't get userid from them. Think about it, if ROUND ENDS how can it get a userid out of it? :D

Aenima

  • Level 5 Trained Intermediate
  • Posts: 101
  • Learn to Swim !
Re: [Tutorial] Basic Coding Concept.
« Reply #28 on: May 01, 2011, 02:05:57 PM »
lol yea i hear ya, it weird but "roundendcmd" still works with server_var(wcs_userid)  and its used on the right person,
just try it :)

anyway do you know any way to be able to set a wcsgroup var back to 0 AFTER a new round player respawn ?


 


* Ads