Sign in to follow this  
Followers 0
Tasijjj

Setting and getting entity keys and values

12 posts in this topic

Hi guys.

It's maybe a simple question.. I'm not very familiar with a syntax and everything so I would appreciate a quick help.

Here are the problems:
Can I set a random pair of key and value to a trigger_multiple in Radiant? (example: key="something", value=0)
How do I get that value in the script to use it in the logical statements? (ex.: if (something==0))
How do I change the value of the key "something" in the script? (ex.: key="something", value=1)

1) I suppose you must first use

thing=getEnt(value, key); // to get the entity

 

2) and than

 

x = thing.something getValue(); // I am not sure how this syntax must look like...

3) and finally

 

thing.something setValue(1); // sorry if those two statement seem funny, but I would really like to show you what I mean

 

Thanks for the answer.

0

Share this post


Link to post
Share on other sites

see raw\radiant\keys.txt :dave:

I do not have this file.

Not even a radiant folder (I have installed modtools).

I should have mentioned that I'm modding CoD2.

Everything that I found for CoD5 or CoD4 worked fine even with CoD2 till now so I suppose this is not a problem.

0

Share this post


Link to post
Share on other sites

For the next time please mark the topic with [cod2] tag or something so we know that in future. And again, if it's cod2 instead of "raw" search for that file in one of .iwds

 

 

edit: it's in iw_07.iwd

1

Share this post


Link to post
Share on other sites

For the next time please mark the topic with [cod2] tag or something so we know that in future. And again, if it's cod2 instead of "raw" search for that file in one of .iwds

 

 

edit: it's in iw_07.iwd

Ok. Sorry for that.

Thanks for the answer. It helped.

0

Share this post


Link to post
Share on other sites

Can someone also explain the waittill() function, please.

What does the arguments mean.

Example: waittill("trigger", other)

0

Share this post


Link to post
Share on other sites

Thank you. It helps.

Also.. another thing. Is it possible to make an usable Flak88 turret in CoD2 (like mg42)?
 

If it is possible to use it in the singleplayer (in last mission, when you have to destroy a tiger by using Flak88), than maybe you can import the same code to use it in a multiplayer map???

0

Share this post


Link to post
Share on other sites

Thank you. It helps.

Also.. another thing. Is it possible to make an usable Flak88 turret in CoD2 (like mg42)?

 

If it is possible to use it in the singleplayer (in last mission, when you have to destroy a tiger by using Flak88), than maybe you can import the same code to use it in a multiplayer map???

you know it's hardcoded in engine, right? Although you can split the model in two, and code your own turret in gsc.

0

Share this post


Link to post
Share on other sites

you know it's hardcoded in engine, right? Although you can split the model in two, and code your own turret in gsc.

What do you mean by splitting the model in two?... are there any tutorials on making turrets? 

0

Share this post


Link to post
Share on other sites

You cannot animate models in MP, instead either split the flak88 cannon into two parts, the barrel (which you'd likely want to rotate), and the rest of it which you wont.

 

 

To code a turret you'd most likely want to rotate it in targeted location and then simply spawn the bomb shell at the end of barrel and make it move& catch colision :dave:

0

Share this post


Link to post
Share on other sites

You cannot animate models in MP, instead either split the flak88 cannon into two parts, the barrel (which you'd likely want to rotate), and the rest of it which you wont.

 

 

To code a turret you'd most likely want to rotate it in targeted location and then simply spawn the bomb shell at the end of barrel and make it move& catch colision :dave:

Ok. For the first part I don't really see any problems.. 

But for the second I have some specific questions and I would really appreciate a tutorial if such exists.

Or even better, if the code already exists I would be the most happy copying it, 'cause it would save me a lot of time.

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0