[cod4] mp_portal WIP

Have a jump map that we don't have on our site? Let us know!

Moderator: Core Staff

Post Reply
User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Re: [cod4] mp_portal WIP

Post by Nightmare » March 6th, 2010, 9:11 pm

The commands you can use for printing onto the player's screen are:

Code: Select all

iprintln("Hello");  //Will print in bottom left corner
iprintlnbold("Hello");  //Will print in center
You can use the print command for debugging, as it will only print in console.

As for the velocity command on the script reference, this is only allowed in SP, not MP.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: [cod4] mp_portal WIP

Post by waywaaaard » March 6th, 2010, 9:15 pm

Rez|l wrote:The command for printing something on the screen is iprintlnbold("text");

The .iwd(not .idw) file is basically .rar format. Just copy one of iw's and delete all of the folders, then create your own(the .gsc-script file should be located in .iwd/maps/mp)
it's zip on normal compression rate isnt it?
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: [cod4] mp_portal WIP

Post by Rezil » March 6th, 2010, 9:22 pm

Lev!athan wrote: it's zip on normal compression rate isnt it?
Dunno, I open it with winrar all the time. I also read on modsonline a long time ago that it's a rar format but modsonline is shit for anything above basic. -.-
I'm not sure what you mean by copy one of iw's and deleting. What file/folder do I need to copy and what do I need to delete?
Well, duplicate one of the .iwd files you already got with the game(for example, make a copy of iw_12.iwd). Now, create a new folder in the copy of the iw_12.iwd file called maps and then delete the images folder(the sequence is important, if you delete the images folder first, the .iwd won't contain anything and will be deleted). Now, inside the maps folder make another folder called mp and place your mp_portal.gsc(from raw) into the .iwd. This is the safest method of making an .iwd as I've noticed sometimes when making one directly from raw folders doesn't always work for me. :?
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: [cod4] mp_portal WIP

Post by Drofder2004 » March 6th, 2010, 9:27 pm

Read my tutorial on the use of "notify" (I think I completed that part?)

println() is for printing to the console (good for creating or logging text)
I could not tell you the reason for AllClientsPrint as I have not tested it and using iprintln/bold will print to the server, which everyone should see. My guess is that you can make the message sent personalised to the player.

sayAll() is a command I haven't used or tested, but I gather it sends a message to all players (same as if you were to press 't' and type).

announcement() I have never used.

---

As for IWD's, I have always used "pakscape.exe". Google and find on filefront (most game have a format in it, just use pk3 and rename to iwd).
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

CX gamer
CJ Fan
CJ Fan
Posts: 119
Joined: November 4th, 2009, 1:13 pm
Location: Belgium
Contact:

Re: [cod4] mp_portal WIP

Post by CX gamer » March 6th, 2010, 10:38 pm

Rez|l wrote:
Lev!athan wrote: it's zip on normal compression rate isnt it?
Dunno, I open it with winrar all the time. I also read on modsonline a long time ago that it's a rar format but modsonline is shit for anything above basic. -.-
I'm not sure what you mean by copy one of iw's and deleting. What file/folder do I need to copy and what do I need to delete?
Well, duplicate one of the .iwd files you already got with the game(for example, make a copy of iw_12.iwd). Now, create a new folder in the copy of the iw_12.iwd file called maps and then delete the images folder(the sequence is important, if you delete the images folder first, the .iwd won't contain anything and will be deleted). Now, inside the maps folder make another folder called mp and place your mp_portal.gsc(from raw) into the .iwd. This is the safest method of making an .iwd as I've noticed sometimes when making one directly from raw folders doesn't always work for me. :?
Thanks, but still got questions;
  1. I copied iw_00.idw from D:\CoD4\main
  2. I pasted iw_00.idw in D:\CoD4\usermaps\mp_portal
  3. I renamed iw_00.idw to mp_portal.idw
Now where do I need to create a new folder?
Drofder2004 wrote:Read my tutorial on the use of "notify" (I think I completed that part?)

println() is for printing to the console (good for creating or logging text)
I could not tell you the reason for AllClientsPrint as I have not tested it and using iprintln/bold will print to the server, which everyone should see. My guess is that you can make the message sent personalised to the player.

sayAll() is a command I haven't used or tested, but I gather it sends a message to all players (same as if you were to press 't' and type).

announcement() I have never used.

---

As for IWD's, I have always used "pakscape.exe". Google and find on filefront (most game have a format in it, just use pk3 and rename to iwd).
Awesome tips, thanks. :D
As for pakscape, my download limit has been reached for this month. I won't be downloading anything until the 15th. :(
I just have enough internets to browse text-based sites, if I'm patient. XD
Soviet wrote:Technically all servers on MW2 are dedicated servers because they're all dedicated to sucking :wink:

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: [cod4] mp_portal WIP

Post by Rezil » March 6th, 2010, 11:52 pm

IWD, not IDW
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

CX gamer
CJ Fan
CJ Fan
Posts: 119
Joined: November 4th, 2009, 1:13 pm
Location: Belgium
Contact:

Re: [cod4] mp_portal WIP

Post by CX gamer » March 7th, 2010, 12:32 am

Ye that's what I meant. Where is this images folder?
Soviet wrote:Technically all servers on MW2 are dedicated servers because they're all dedicated to sucking :wink:

CX gamer
CJ Fan
CJ Fan
Posts: 119
Joined: November 4th, 2009, 1:13 pm
Location: Belgium
Contact:

Re: [cod4] mp_portal WIP

Post by CX gamer » March 7th, 2010, 1:44 am

Log?
Is it really worth doing a log today?
Spent the whole day trying to figure out how to make that script... Still can't find the right images folder, scanned 1 TB of filled memory, but no trace of any cod-related images folder... :?

Code: Select all

Total rooms: 10
Day: 14
Water: 15 liters
Apple juice: 12 liters
Cola: 3 liter
Life: 2
Soviet wrote:Technically all servers on MW2 are dedicated servers because they're all dedicated to sucking :wink:

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: [cod4] mp_portal WIP

Post by Rezil » March 7th, 2010, 1:50 am

ffs, the images folder is in the iw_12.iwd file. Make a copy of it, open it with winrar and make a maps fodler inside the copy of iw_12.iwd. Then delete the images folder. -.-
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

CX gamer
CJ Fan
CJ Fan
Posts: 119
Joined: November 4th, 2009, 1:13 pm
Location: Belgium
Contact:

Re: [cod4] mp_portal WIP

Post by CX gamer » March 7th, 2010, 10:31 am

Rez|l wrote:ffs, the images folder is in the iw_12.iwd file. Make a copy of it, open it with winrar and make a maps fodler inside the copy of iw_12.iwd. Then delete the images folder. -.-
Oooh damn... This is awkward... :oops:
Thanks, I'll try it now... :D

EDIT: Great! That works! :D
First results where it prints the text;

Code: Select all

//     AllClientsPrint("2"); Low-left
//     Announcement("3");  Center
//     IPrintLnBold("5");  Low-left
//     Print("6");  Center
EDIT2: What's wrong with this code?
It's a simple test I tried, because I know GetStance outputs a string value.

Code: Select all

IPrintLnBold(level.player GetStance());
Soviet wrote:Technically all servers on MW2 are dedicated servers because they're all dedicated to sucking :wink:

mr-x
CJ Newbie
CJ Newbie
Posts: 61
Joined: March 7th, 2010, 3:33 pm

Re: [cod4] mp_portal WIP

Post by mr-x » March 7th, 2010, 3:35 pm

CX gamer wrote:
Rez|l wrote:ffs, the images folder is in the iw_12.iwd file. Make a copy of it, open it with winrar and make a maps fodler inside the copy of iw_12.iwd. Then delete the images folder. -.-
Oooh damn... This is awkward... :oops:
Thanks, I'll try it now... :D

EDIT: Great! That works! :D
First results where it prints the text;

Code: Select all

//     AllClientsPrint("2"); Low-left
//     Announcement("3");  Center
//     IPrintLnBold("5");  Low-left
//     Print("6");  Center
EDIT2: What's wrong with this code?
It's a simple test I tried, because I know GetStance outputs a string value.

Code: Select all

IPrintLnBold(level.player GetStance());
: iprintlnbold(text)
weird capital letters again

and maybe level.player is not defined

CX gamer
CJ Fan
CJ Fan
Posts: 119
Joined: November 4th, 2009, 1:13 pm
Location: Belgium
Contact:

Re: [cod4] mp_portal WIP

Post by CX gamer » March 7th, 2010, 3:39 pm

:shock:... How do I define the player?!...
Soviet wrote:Technically all servers on MW2 are dedicated servers because they're all dedicated to sucking :wink:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Re: [cod4] mp_portal WIP

Post by Nightmare » March 7th, 2010, 3:51 pm

You're probably going to want to make a trigger. With the trigger texture selected, make a brush where you want the player to have the message.
Right click it while it's still selected and select from the trigger list, the most commonly used ones are multiple and use.

Trigger_multiple will be triggered when someone touches with his body.
Trigger_use will be triggered when someone presses their use key at it.

When you have your trigger made, with it still selected, press N.
You will want to give it some targetname and values. I'm just going to use the following name as an example.

Key: targetname
Value: sayItTrigger

Once you are done with that in the mapping part, all you need in the scripting is the following:

Code: Select all

trigger = getent("sayItTrigger","targetname");    //Defines the trigger
trigger waittill("trigger",player);    //Waits until the trigger has been triggered, saves whoever did it as "player"
iprintlnbold("Your stance is " + player.getStance());   //Prints the players stance
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: [cod4] mp_portal WIP

Post by Drofder2004 » March 7th, 2010, 4:13 pm

mr-x wrote:: iprintlnbold(text)
weird capital letters again

and maybe level.player is not defined
Capitalised lettering is the standard used, although the language is not case sensitive.
iPrintLnBold
allClientsPrint()

First letter is lower case, the first letter of the next word, is upper case and so forth. It makes it slightly easier to read imo.
And yes, technically speaking level.player would not be defined. level.player is the defined value of the player in single player mode.
CX gamer wrote: As for pakscape, my download limit has been reached for this month. I won't be downloading anything until the 15th. :(
I just have enough internets to browse text-based sites, if I'm patient. XD
Its 228kb of file... Its not an install pakage, it is a standalone exe file.

---

If you are simply printing a message to screen when a player reaches a certain moment, then its best to use as Nightmare has shown a trigger.

A more advanced way is to used a playerConnect thread, but at the moment I would suggest you stick to the basics :).
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

CX gamer
CJ Fan
CJ Fan
Posts: 119
Joined: November 4th, 2009, 1:13 pm
Location: Belgium
Contact:

Re: [cod4] mp_portal WIP

Post by CX gamer » March 7th, 2010, 4:26 pm

Thanks... :D
Can you give a hint of where the trigger texture is located?
I've scrolled through it 4 times, but I couldn't find it... :oops:
Soviet wrote:Technically all servers on MW2 are dedicated servers because they're all dedicated to sucking :wink:

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 25 guests