Home   Help Search Login Register  

Author Topic: A very simple script!  (Read 624 times)

0 Members and 1 Guest are viewing this topic.

joe_mamma518

  • Guest
A very simple script!
« on: 15 Aug 2003, 04:16:31 »
Ok i need a script that when activated it counts the men on each side and then write it in a hint.

This was my first idea

_East = countenemy units
_West = countfriendly units

Hint "West: _West, East: _East"

This doesnt work at all and it hints "West: _West, East: _East" and never any numbers.  So i dont know if when i take out the "units" parts if it is working.  Okay so if i can get it that way i can have it display all different types of things like man, armour etc.

Now another way it might be possible is with just the count command.  Something like:

_East = count units
_West = count units

then the same hint thing... ok but i really know nothng and i dont even know if "units" is something that the computer knows its meaning..... well thats why i posted this!

deaddog

  • Guest
Re:A very simple script!
« Reply #1 on: 15 Aug 2003, 04:28:07 »
Try this:

Make a trigger that covers the whole map
type : anybody present
on activation:
hint format ["E:%1  W:%2",east countside thislist,west countSide thislist]

Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re:A very simple script!
« Reply #2 on: 16 Aug 2003, 03:36:42 »
It won't work for me.
I have a west sniper as the player and 4 east soldiers, as soon I preview the think comes as a hint, west1 east 4. I kill one east soldier and I still geting the same result, west 1 east4, I kill another one after a few seconds and stil the same. Like that untill I waste them all, then the hint go away.
SCREWBY!!!

deaddog

  • Guest
Re:A very simple script!
« Reply #3 on: 16 Aug 2003, 04:29:24 »
It works exactly as intended.  I think what you mean is that it doesn't update the count as you kill the enemy.  That would require a little scripting.


Offline @cero

  • Members
  • *
  • Yeah! Get some!!
Re:A very simple script!
« Reply #4 on: 16 Aug 2003, 05:50:01 »
Yeah, that's what I was expecting to happand. ;D
SCREWBY!!!

joe_mamma518

  • Guest
Re:A very simple script!
« Reply #5 on: 16 Aug 2003, 22:32:49 »
okay yeah i did the same thing and that happened to me too.  Now there are two ways i know u can fix it:

First is that u make a bunch of triggers exactly the same and just have a countdown timer them all with about a 2 second difference in each.  Now the problem  is that you have to make like 100 of them just to get 200 seconds of it........ u could always change the time to like a minuet but it still sucks.

The second one is u make a script and 3 triggers:

The first trigger u make it "Weat Present" and name it "WArea".  Make it big enough to cover all the west units.  The second one u make "East Present" and named "Earea" and big enough to cover all the east guys.  The third one u make to acctivate the script.  You can just make it Alpha Go and then in the on acivation u type "player exec" then the name of the script ( i think u put the name if the script in quotes).  Now for the script u type this:

#start
hint format ["E:%1",east countSide list EArea]
~2
hint format ["W:%1",west countSide list WArea]
~2
goto "start"

You can change the "~2" parts to whatever delay you want and thats the end of that.  Okay now the problem is that every 2 seconds  u hear a ding and most of the time its the same numbers.  So instead u can make your activation trigger set to "repeatedly" and change the script to this:

hint format ["E:%1",east countSide list EArea]
~2
hint format ["W:%1",west countSide list WArea]
exit

Thats all I know about this because im still very new at this scripting shit so im sure there are far better ways of doing it.
« Last Edit: 16 Aug 2003, 22:34:36 by joe_mamma518 »

joe_mamma518

  • Guest
Re:A very simple script!
« Reply #6 on: 16 Aug 2003, 23:19:09 »
I was thinking and u might be able to make it update only when people are killed.  I have not yet tried this script and im pretty sure it wont work (my scripts never work) but u would just replace the other script with this one:

_West = West countside list WArea
_East = East countside list EArea

hint format ["W:%1",_West]
~3
hint format ["E:%1",_East]

_West = _a
_East = _b

#start
? _West < _a : goto "west"

#Estart
? _East < _b : goto "East"
~1
goto "start"

#West
hint format ["W:%1",_West]
_a - _West = _c
_a - _c
~2
goto "Estart"

#East
hint format ["E:%1",_East]
_b - _East = _d
_b - _d
~2
goto "Start"

That probabily wont work but im sure some people with a little bit of experience could easily point out anything wrong.