Home   Help Search Login Register  

Author Topic: Question about naming a unit ingame...  (Read 1434 times)

0 Members and 1 Guest are viewing this topic.

Korax

  • Guest
Question about naming a unit ingame...
« on: 23 Oct 2003, 07:48:58 »
What is the easiest way to name a unit in your group with a script ingame?

Im sorta playing around with some rts missions and i want to name a unit that ive previously created for myself... I dont want to name the unit right when im creating him with the createunit command because that would get too complicated for me....
Any ideas?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Question about naming a unit ingame...
« Reply #1 on: 23 Oct 2003, 07:52:04 »
I don't think you can do that, except in certain cases.

:beat: *Gets Shot* :beat:
« Last Edit: 23 Oct 2003, 07:52:28 by The real Armstrong »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Question about naming a unit ingame...
« Reply #2 on: 23 Oct 2003, 11:48:24 »
Naming a unit when you createUnit him is very easy - just look at the example in the online command ref in the Ed Depot.

Naming him later on is probably impossible.    How do you refer to him in order to name him if he doesn't have a name?
Plenty of reviewed ArmA missions for you to play

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Question about naming a unit ingame...
« Reply #3 on: 23 Oct 2003, 13:29:09 »
@ macca

Quote
How do you refer to him in order to name him if he doesn't have a name?

every unit have 1000s of names :P (well mebe just 10s of em ::))

like da unit can b refered as

1) (units group) select num

2) leader groupname (in case its group leader)

3) activator of triger

4) event handlers

5) crew vehicle (select num)

nd lots of oder wayz 2 refer 2 nameless units ;)

so da Q is - wen do u want 2 name da unit ?

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Question about naming a unit ingame...
« Reply #4 on: 23 Oct 2003, 14:11:22 »
I didn't know about the first one, that's pretty useful.
Plenty of reviewed ArmA missions for you to play

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Question about naming a unit ingame...
« Reply #5 on: 23 Oct 2003, 14:40:03 »
units groupname just give ya array w/ all da units in da group ;) :P

so u can choose ny of em ;)

now plz stop postin so i can catch up w/ da post count :P

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Question about naming a unit ingame...
« Reply #6 on: 23 Oct 2003, 15:08:20 »
OK  

 ::)
Plenty of reviewed ArmA missions for you to play

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Question about naming a unit ingame...
« Reply #7 on: 23 Oct 2003, 17:12:40 »
rofl :P

::)

go take a vication - u r here 4 2 much taam  ;D  :o

now stop postin

*shot macca

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Question about naming a unit ingame...
« Reply #8 on: 23 Oct 2003, 17:19:10 »
Why am I the only one who gets warnings when I spam? :'(

:beat: *Gets Shot* :beat:

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Question about naming a unit ingame...
« Reply #9 on: 23 Oct 2003, 19:14:29 »
cuz we relive da forums :P (i thinkwe got kinda Tombish invisiblity from mods - u get dat after u help ppl alot ;) :P)

or mebe we do get warned we just dont spam as much :P ::) right KTotte ? ;)

or we just can mix da spam w/ somin usefull like dat ?

@ Korax

wat is exactly da situation u want 2 name da unit in ? we need more details 2 help ya ;)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Korax

  • Guest
Re:Question about naming a unit ingame...
« Reply #10 on: 24 Oct 2003, 04:44:26 »
Well basically me and a friend were just trying to get 2 scripts to work in an RTS game.. where it takes the other 11 units in your group, names them, then takes them out of your group, so you can build more units, and then when you activate the other script it names the units currently in your group, takes them out of your group and then re-adds the other preiviously named units from your first group.. and can be repeated throughout the game... This way i "think" it would be possible to control 2 different groups, just by switching back and forth every now and then  ;D

I guess thats the best i can explain it   :P

Korax

  • Guest
Re:Question about naming a unit ingame...
« Reply #11 on: 24 Oct 2003, 05:21:35 »
maybe i dont have to name them? just define them for the script(s)?
something like this maybe...

Quote
_man1 = (Units GroupW1) select 2
~1
_man1 join grp1
~1
_1man1 = (Units Grp2) select 2
~1
_1man1 join GroupW1

then when i want to switch back...

Quote
_1man1 = (Units GroupW1) select 2
~1
_man1 = (Units grp1) select 2
~1
_1man1 join grp2
~1
_man1 join GroupW1
(grp1 and grp2 are just empty groups placed on map to hold my units..)

I guess that would be my lil script in short... but sadly it doesnt work  >:(

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Question about naming a unit ingame...
« Reply #12 on: 24 Oct 2003, 10:53:04 »
da prob here is dat u need arrays 4 da join command 2 work :P so ur cud shud b like dat ;)

Code: [Select]
_man1 = (Units GroupW1) select 2
~1
[_man1] join (leader grp1)
~1
_1man1 = (Units Grp2) select 2
~1
[_1man1] join (leader GroupW1)

change da switch back 1 also ;) :P

btw if ny of ur group is full (12 members) wen u try 2 join som1 2 em - ull have probs doin it  :-X so ull have 2 unjoin som1 from da full group b4 like dat

[unitname] join grpnull

try da sugested way nd if u stil have probs (nd derell prooly b) post again

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Korax

  • Guest
Re:Question about naming a unit ingame...
« Reply #13 on: 24 Oct 2003, 22:06:19 »
Nope, still no luck  :'(
I know the rest of the script is fine, but it seems the problem is with the

_man1 = (Units GroupW1) Select 1

ive tested a few scripts with simple example missions with stuff like:

Quote
_man1 = (leader grp1)
~2
_man1 setdamage 1
hint "you should be dead by now"

But it just doesnt work, so i guess you can't define a unit in a group that way...
Any other suggestions?

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Question about naming a unit ingame...
« Reply #14 on: 24 Oct 2003, 22:52:10 »
 :-\


umm

did u name da group grp1 ? (hop u know how 2 do dat ;))

if u did

post da example mision nd ill check it

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta