Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!
Moderator: Core Staff
-
A5H73Y
- CJ Wannabe

- Posts: 34
- Joined: January 27th, 2011, 9:02 pm
- PSN ID: a5h73y
Post
by A5H73Y » June 18th, 2011, 6:16 pm
For instance, If a player has finished my map..
How do i make text come on screen saying you have completed the map?

Ive seen it done in like everymap i just dont know how :L
-
Pedsdude
- Site Admin

- Posts: 15914
- Joined: October 15th, 2004, 7:18 pm
- Location: UK
Post
by Pedsdude » June 18th, 2011, 6:34 pm
You have 2 options:
- Option 1 is to use a trigger_use with a hintstring (this creates the text that moves from side to side in the middle of the screen.)
- Option 2 is to do it with scripting, which is more complicated (although not complicated in itself) and looks more professional.
Your choice of which to use (I won't bother helping further until I know which you want.)
-
Goro92
- CJ Spammer!

- Posts: 605
- Joined: March 7th, 2011, 5:54 pm
- Location: Brescia, Italy
Post
by Goro92 » June 18th, 2011, 6:35 pm
A5H73Y wrote:For instance, If a player has finished my map..
How do i make text come on screen saying you have completed the map?

Ive seen it done in like everymap i just dont know how :L
i know 2 ways:
1:create a trigger-->press N-->key:hintstring-->value:ur text
2:with script
Code: Select all
main()
{
thread finishmap();
}
Â
finishmap()
{
trigger = getent("finishmap","targetname");
Â
  while (1)
  {
   trigger waittill ("trigger", user );
   if ( isPlayer( user ) && isAlive( user ) && isdefined( user.done) )
        {
        wait 0.5;
        }
   else Â
     {
user iprintlnbold ("Congratulations, " + user.name + ", you have completed the map!"); Â
     user.done = true;
     }
  }
}
-
A5H73Y
- CJ Wannabe

- Posts: 34
- Joined: January 27th, 2011, 9:02 pm
- PSN ID: a5h73y
Post
by A5H73Y » June 18th, 2011, 11:12 pm
The first option sounds better for someone of my knowledge, ill try it tomorrow
Thanks!

Users browsing this forum: No registered users and 1 guest