Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 105 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Not being able to open a weaponmenu
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Saturday, Sep. 15, 2012 06:38 pm
z0d writes...
Quote:


so if i replace it with code uve posted, it should work?


Depends what you are talking about. At the moment, you seem to have switched subjects. You are no longer speaking about OpenScriptMenu not working, and seem to be talking about something else. Please be specific about what question you want answered. No one here is a mind reader, and you keep confusing things with the way you ask questions.

So, let me ask you - would what work if you did replaced code with what was posted? OpenScriptMenu? No. That only works in .CFG files (it is a string - it is not an engine/console command).

If you mean something else, please specify what that is.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Sunday, Sep. 16, 2012 09:17 am
Someone was kind enough to PM me and point out that I have been talking at cross purposes with Zod. When I saw the use of the bind command "openscriptmenu" I thought he was entering the instruction via console to open a menu, which is why in my video that is what I what I was doing.

The person who PMed me pointed out that Zod is confusing this instruction with ones the game uses in GSC files, and in all probability is trying to get the ingamer menu to open for a player who is connecting.

I therefore apologise to everyone for going off on a complete wild goose chase. But it just goes to show that when novice modders don't state their intentions clearly and precisely it leads to a lot of unnecessary confusion. Zod is therefore partly to blame for not stating in the Opening Post right up front exactly what it is he was/is trying to achieve. If he had done that, we would have been able to see the modding objective, and work out a way to get there in the best manner.

I also thank the kind soul who PMed me and pointed all this out to me. He wants to remain anonymous but I thank him nonetheless.

---------------

Just to be clear:

1. scriptmenuresponse - is a string sent from a menu. It cannot be used in a GSC file;

2. openscriptmenu - is a development tool used to test menus before they are fully entered into the game. It is used to bind a key to open a menu to test it. It is not recognised by COD script; it wont work in a GSC file.

3. This proves that COD actually has 2 script languages: the one we see most clearly in GSC files and which we know of as COD script; the other is used in .CFG files, and which doesn't have a name that we know of. You cannot interchange these 2 languages. One doesn't work in the other's file type.

4. In COD script, all menus and menu responses are handled with notifications to the game. This is done by functions in the engine. Every time a player clicks something in a menu, and the menu sends the response they make, the engine notifies the game 3 things: 1) that they made a response, 2) what menu it was they responded to, and 3) what that response actually was. You will see these 3 things being waited for by each player in a game in maps\mp\gametypes\_menus.gsc:

Code:
self waittill( "menuresponse", menu, response );


"menuresponse" = 1st part of the notification.
menu = 2nd part of the notification.
response = 3rd part of the notification.

You can therefore control what to do in every instance of a players menu clicks by stating different conditions. If you look through the stock _menus.gsc file, you will see it makes lots of conditions for what the game should do in most given situations if such-and-such a menu has been opened and what to do if such-and-such a menu response has been detected.

That is how you do it in COD script - 1) identify the menu; 2) identify the response; 3) work out what to do if either or both of 1) and 2) have been detected.

Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»