Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
Archive › Old Forum Threads › Help › Scripting Help › Logic/expression Please help||!?
14 posts, 5 people · 1,540 views Thread Rating: ★★★★★
closedLogic/expression Please help||!?
Started by sparky99 on 05-15-2007, 09:36 PM
S sparky99
started this thread
Posts: 263
Threads: 49
Joined: Jan 2006
05-15-2007, 09:36 PM #1

Sorry, I've read the Pawn tutorial but am not a programmer., rnrnCould somebody tell me what from this code :rnrn(sand<0?-(sand):sand) rnrnand thisrnrnget_team_num(player>0?player:newfellow)rnrnin english mean?rnrnrnIm converting a plugin and the symbols ? and the : are unfamiliar to me.rnrnThanks

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
05-15-2007, 11:19 PM #2
Sorry, I've read the Pawn tutorial but am not a programmer., n nCould somebody tell me what from this code :n n(sand<0?-(sand):sand) n nand thisn nget_team_num(player>0?player:newfellow)n nin english mean?n n nIm converting a plugin and the symbols ? and the : are unfamiliar to me.n nThanks
n nabbreviated IFn
get_team_num(player>0?player:newfellow)
n n
n nif(player>0)n{n   get_team_num(player)n}nelsen{n   get_team_num(newfollow)n}n n
S sparky99
started this thread
Posts: 263
Threads: 49
Joined: Jan 2006
05-16-2007, 12:10 AM #3

That was really bugging me now I can find out why my player index is 0!

Zor
posted here
Posts: 688
Threads: 75
Joined: Jun 2006
05-16-2007, 09:44 PM #4

The best way to do something like that is to include it in brackets so you can see the differences:nn

n//          if(player > 0)  do  this  else   thisnget_team_num( ((player > 0) ? (player) : (newfellow)) )
The comment helps people understand wtf...proper coding is the answer to everything...too many ppl are freak show coders...like the coders that learned coding from Java's style of coding...the ppl who started a coding convention like that should be hauled out into the street, pissed on and shot...nnCheers!

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
05-17-2007, 09:57 AM #5
...like the coders that learned coding from Java's style of coding...
n nHAD to mention JAVA huh ?? I JUST got done writing an applet for a school final project... I HATE JAVA, in case any havn't heard me say it lately...n nhttp://JosephMeyers.com/ccc/BlackJack.html

S sparky99
started this thread
Posts: 263
Threads: 49
Joined: Jan 2006
05-24-2007, 02:38 AM #6

My SoccerJam conversion is now working, just ironing out the last bugs in the player upgrades.

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
05-24-2007, 11:20 AM #7
My SoccerJam conversion is now working, just ironing out the last bugs in the player upgrades.
n nSoccerJam huh ? do tell...

S sparky99
started this thread
Posts: 263
Threads: 49
Joined: Jan 2006
05-24-2007, 08:44 PM #8

http://forums.alliedmods.net/showthread.php?t=41447rnrnI got the peeps to kick and score, the explosion effect and sound, just got to get the upgrades to work and turbo properly and the end of round to reset the game.rnrnAlso going to let the scoring team to slaughter the losers at the end of each score for 10 secs and at end of game give the winners guns before reseting like source by replaceing round timers with settask and end of game fireworks in team colours.rnrnIts not my code or idea of course, its for CS but my son likes to play it so I converted it for Dod for him.

diamond-optic
posted here
Posts: 2,068
Threads: 103
Joined: May 2005
05-24-2007, 08:56 PM #9

heh would that actually make the fifa whatever map fun?

S sparky99
started this thread
Posts: 263
Threads: 49
Joined: Jan 2006
05-24-2007, 09:08 PM #10

Just like the FIFA map It comes with its own maps with custom entities in the map files and a FGd?? file for map editing for the ball spawn points, netareas, You can change the gravity and play space maps and basketball. The ball trails a nice orange tail so it looks a bit like a comet. We tried with guns instead of knifes but it unbalances the game.

{SR} *Raggy*
posted here
Posts: 370
Threads: 27
Joined: Apr 2006
05-25-2007, 06:21 AM #11

It'd be cool to make maps like that :P You gotta post this up here :P I'm sure people will like that :P I'll use it anywayz :D

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
05-25-2007, 08:23 AM #12
It'd be cool to make maps like that :P You gotta post this up here :P I'm sure people will like that :P I'll use it anywayz :D
n nYeah I am curious about the whole setup ... I can host any files you want if you have a "package" of stuff for making specific maps for this plugin...nnbut I really just want to see what you have done as far as package contents, and really the edits you made to a fgd and what that does for the map...n nAs a plugin alone it sounded interesting.. to know you went a step futher and customized the fgd for mapping, actually have a few maps designed to work with plugin, etc is all interesting to me... I have had a few concepts I wanted to employ that WOULD in fact require a few "changes" to some of the maps entities, or additions of "custom" ones... so I just want to see what you have done and "pick it apart" to see how it all works (I learn best what I know through reverse engineering)

S sparky99
started this thread
Posts: 263
Threads: 49
Joined: Jan 2006
05-26-2007, 09:22 AM #13

I chose this so my son could kick the ball around on Dod. Ill put up the sma thats converted so far (IF I AM ALLOWED, could I have some guidence on this as its not my code), but you will all laff at my effort, it was hacked up to prove it could work for Dod. If you read my very first post you will get some idea of how far ahead the last two posts are. Remember I haven't coded ever!, it plays, I'm experimenting. I'll tart it up a little bit tomorrow and post it so the real coder's can address the things I've done wrong and get the things that don't work to work properly (round timers, XP). If you want to know more look at the link for the creater of the CS plugin that was posted earlier, its all there, personally I would not put it on a paid for or clan server AT ALL, my clan is used to my tinkering yours might not be so forgiving. I'll also post some questions I have about the concepts of how plugins work that I have in my head and wether to use round state triggers, timers or emulate the rounds like in CS. (Currently I'm soft killing players at score time to simulate a score ending and respawn, not nice but it can have some future fexibility for end of round bonuses)

=|[76AD]|= TatsuSaisei
posted here
Posts: 794
Threads: 54
Joined: May 2005
05-26-2007, 12:35 PM #14
my clan is used to my tinkering yours might not be so forgiving.
n nyou obviously don't know me and my clan very well... we LIVE for new and different things, and everyone is always on me about what is coming next... n nbut anyways post it in the TEST plugin section, especially if it still a work in progress... once you are "done" then worry about "where" to post it... just be sure to give credit to anyone whose base code you may have used...n nbtw, I have downloaded all the files associated with the link you provided and will look over it more sometime later today...

Archive › Old Forum Threads › Help › Scripting Help › Logic/expression Please help||!?
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC