Jump to content
Sign in to follow this  
Nightjay0044

Scripting challenges

Recommended Posts

Here's an idea. This is mainly for people who know how to script.

I say if people have ideas for OFP for thier missions and don't know how to do it.

Like for example script challenge could be:

"If a helicopter gets above 50meters the car on the ground explodes"

Kind of concepts like that for other scripters to test their knowledge and try and script it.

Now the people coming up with the ideas donot have to be scripting masters, heck they dont even have to know how to script, they can just come up with the idea, post it,and see if anybody can make it. That way we can get more advanced scripts out there made for peopel to use to enhance there missions.

IF anyone could agree with this idea let me know or otherwise just post your thoughts. Thanks.

Share this post


Link to post
Share on other sites

I don't see the point... but I'm not quite sure I understand either.

What exactly are you proposing?

Share this post


Link to post
Share on other sites

Well there aren't really many one-for-all scripts. Most scripts are designed for one mission and purpose solely, as scripts are usually taken to do things that cannot be done in the editor alone.

Many things can although (like the example you posted), with the only help of triggers and logics.

So what's the purpose really?

Share this post


Link to post
Share on other sites

I think it would be better for people learning how to script, rather than people that know how to script. setting them goals would give more practical goals in their learning experience and spped the process.

Share this post


Link to post
Share on other sites
Hey, if you know what he means why won't you explain it to me... icon_rolleyes.gif

Hes basically saying we should create a scripting resource for newbies, with scripts such as the above example being requestable.

Share this post


Link to post
Share on other sites
Hes basically saying we should create a scripting resource for newbies, with scripts such as the above example being requestable.

Well, you don't need scripting for that.

Create a trigger with the condition '(getpos helo select 2)>50' and onActivation 'car setDamage 1'. You don't need scripting for that, just as you don't need scripting for many things wink_o.gif

Share this post


Link to post
Share on other sites

hardrock: Um that is scripting, just not in a script file.

Share this post


Link to post
Share on other sites
hardrock: Um that is scripting, just not in a script file.

Well, where's the difference in mission making and scripting then in your opinion? Is there any?

Share this post


Link to post
Share on other sites

We had a scripting ideas section over at Ofpec if you guys remeber. It was a pretty active forum too.

I doubt BI will create such a thing though as their Mission editing and scripting section is a bit on the limited side.

Just wait until Ofpec gets back on it's feet and you'll have your Ideas section and a bundle of snippets to choose from.

Saying that though don't be scared to ask for help with scripting here. I'm sure there are loads of people who will help you.

Share this post


Link to post
Share on other sites

Hey guys~

GENERAL NOTE:

Alright let me start off explaining myself more since we need some more of that. Here is the idea.

On one day, a mission maker or just a basic fan of OFP is sitting at his computer playing a mission or making a mission. (this mission maker or fan can be a mission maker, a newbie, an advanced editor, any type it does not matter for this idea.)

He sits there and maybe he's playing a mission and he gets this idea. I wonder what it would take to create something that would tell me when I only have 10 bullets in my magazine clip. (Say this is future tense scenario happening, this isn't really happening just trying to explain my idea here).

So he hops over to a website, any website that would support this on their forums or their main site, it doesn't matter. He posts or submits the idea to their site for the scripters to try and make because he knows it can't be done with just original mission making with waypoitns and such. So he submits his idea..

(Now if we decide to do this, it would be totally out of the scripters own free will to make these scripting challenges, the only recognition/reward they'de get is their own personal glory and recogniztion from the OFP Community, or if any would create like a prize or something then they'de get that, but otherwise just being known that they created the script.)

So the scripter looks at this guys idea and goes, I would like to make this. So he lets the guy know and takes on the challenge and lets him know he'll be done as soon as possible. (this challenge could be anything, which it requires scripting, anywhere from internal scripting to external, internal:meaing initialization fields, condition, on activation fields, game logics, etc....External: meaning anything that's done on the desktop with scripting outside of OFP Game interface)

Then the scripter finishes his idea and sends it to any sites or forums he wants who support this concept, also he sends it to the guy he orginally had the idea in the first place. (also I think if people are willing to do this, they should provide a document with help on what to do to us the script inside their own mission)...

So then the guy publishes his script or submits it and it can be used by others at anytime they want too then it would be another great script that nobody has made or thought about at all really or maybe they have but they just haven't made it yet. Then the scripter gets the credit for it just to be fair. (moving on)

MY PROPOSAL:

What I'm offering here is for a scripter who knows what there doing to take on scripting challenges requested or an idea thrown out by anybody who likes OFP they dont have to mission make or anything they can just have a scripting idea and throw it out there on OFP community sites or forums who could support this topic and the scripter would take on his challenge and release it and make it happen.

Now Depending on the script requested or idea generated it might take up a lot of the scripters time so if they decide to do they need to know it's probably not something that's going to take like 5mins or 30mins maybe more depending on what the OFP fan came up with. Now the scripter doesn't have to create it if he doesn't want too, but the responsible and loyal thing would be to if he decides to take on this task he should probably finish it and not just make it half way through and then not do it anymore for whatever reason. Now I Know it might be something personal that can't be helped then I guess we would have place for unfinishes script idea or maybe somebody else who scripts would have to start working on it from scratch or pick up where the other guy left off.

Now it's probably a good idea, for the scritper to know what he's doing, but if he has experience and is willing to take on the challenge then more power to him. the scripter might need some help depending on the size of the script idea or what he knows it needs to be done to make this script happen.

I hope that gives you guys more of an idea on what I mean. I hope people consider this because it would be usefull, there are still hundreds of scripts to be made I'm sure as long as we have a mind and can use our imagination there is. Any questions or thoughts let me know..

biggrin_o.gif

Share this post


Link to post
Share on other sites

nice idea, its nice to have challenges whilst waiting for arma, also its nice to help people out. this will be moved soon, but look forward to it. i would have sadi like others about ofpec, but to be honest ,i dont like having all eggs in one basket ofpec was archuved ,but for some reason the archive has now been removed in last 3 weeks. so the more scripting data bases the better,

nice 1. the script i am currently working on ,will make ai aproach an enemy in random ways , i.e sniper from 200 yards away, machine gunner from front , 2 men fro each side ,etc etc. never same. prolly been done, but its the making that improves the skills.

Share this post


Link to post
Share on other sites

The problem, Nightjay0044, is that these kinds of things are usually mission specific. Simply having/knowing how to do specific things like finding the ammo count of a weapon aren't going to be good for anything unless the person knows how to apply it to something.

Besides, it's not going to solve any long-term problems. What I believe is that everyone who wants to make serious missions should (completely) learn how to script - no exceptions.

I hate when people think it's hard, it's not, they only make it hard for themselves by trying to tackle the bigger problems first that arise when they want to make missions but don't know how to do something, whereas if they had learned scripting first they would have started off simple and progressed to the point where they could realize their mission ideas. Everyone with a properly developed brain is capable of scripting, they just need to realize how to use it.

It's like all of those people who think math is hard. Math is simple (what could be more simple than the common facts that everything is based on), yet they find it hard because they complicate it by trying to use it without understanding it - not even realizing that they use it every second of every day, not being able to make the connections.

Back on topic, this isn't going to encourage anyone to start scripting themselves, so I have no choice but to oppose it.

Share this post


Link to post
Share on other sites

It's still something to keep the scripters something to do and have fun with it.

How about we just stick to it as something if someone needs a script done that they don't know how to do they can post a script challenge for someone to take on??

We could possibly do that, since nobody might not want just a scripting challenge area in general make it more specific.

Share this post


Link to post
Share on other sites

I have a scripting challange.

This is for making an addon. I am making a rank script for an addon, but the problem is the more the unit kills, the higher his rank gets. Clearly, this is undesirable. I need a way to prevent the units rank from rising.

Here is the code:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;some basic vars

_unit = _this select 0

; get rank

_rank = rating _unit

? _rank >= 0 and _rank < 500: _unit setobjecttexture [0,"\KMMint\rank\private.paa"]; Exit

? _rank >= 500 and _rank < 1500: _unit setobjecttexture [0,"\KMMint\rank\corporal.paa"]; Exit

? _rank >= 1500 and _rank < 2500: _unit setobjecttexture [0,"\KMMint\rank\sergeant.paa"]; Exit

? _rank >= 2500 and _rank < 3500: _unit setobjecttexture [0,"\KMMint\rank\lieutenant.paa"]; Exit

? _rank >= 3500 and _rank < 5000: _unit setobjecttexture [0,"\KMMint\rank\captain.paa"]; Exit

? _rank >= 5000 and _rank < 7500: _unit setobjecttexture [0,"\KMMint\rank\major.paa"]; Exit

? _rank >= 7500: _unit setobjecttexture [0,"\KMMint\rank\colonel.paa"]; Exit

exit

Think you can stop this guy from getting promoted? wink_o.gif

Abs

Share this post


Link to post
Share on other sites
I have a scripting challange.

This is for making an addon. I am making a rank script for an addon, but the problem is the more the unit kills, the higher his rank gets. Clearly, this is undesirable. I need a way to prevent the units rank from rising.

Here is the code:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;some basic vars

_unit = _this select 0

; get rank

_rank = rating _unit

? _rank >= 0 and _rank < 500: _unit setobjecttexture [0,"\KMMint\rank\private.paa"]; Exit

? _rank >= 500 and _rank < 1500: _unit setobjecttexture [0,"\KMMint\rank\corporal.paa"]; Exit

? _rank >= 1500 and _rank < 2500: _unit setobjecttexture [0,"\KMMint\rank\sergeant.paa"]; Exit

? _rank >= 2500 and _rank < 3500: _unit setobjecttexture [0,"\KMMint\rank\lieutenant.paa"]; Exit

? _rank >= 3500 and _rank < 5000: _unit setobjecttexture [0,"\KMMint\rank\captain.paa"]; Exit

? _rank >= 5000 and _rank < 7500: _unit setobjecttexture [0,"\KMMint\rank\major.paa"]; Exit

? _rank >= 7500: _unit setobjecttexture [0,"\KMMint\rank\colonel.paa"]; Exit

exit

Think you can stop this guy from getting promoted? wink_o.gif

Abs

There's got to be a better way to do that. Why are you using the rating? Is this an init script or does it update periodically?

Share this post


Link to post
Share on other sites

It's an init script.

Any theories on a better way?

Abs

EDIT: The reason I chose this way is because I figured out that when you place a unit in the editor and change its rank, all it does is improve the rating. I don't know of any other way to get a units rank.

Share this post


Link to post
Share on other sites

hmm , didnt know that, thought addrating was for the score, defined in desc.ext as to how many stars you get.i thought rank was definedd in mission editor and you kept that rank,unless the one above you was killed , i.e No2 becomes leader when leader dies ?. could be wrong ,usually am nearly but not always sometimes smile_o.gif.

there was this ,from the old ref. tho dunno if it helps,

score unit

Operand types:

unit: Object

Type of returned value:

Number

Description:

MP: Check unit score.

Example:

score unitOne

Share this post


Link to post
Share on other sites

Nope. To prove it, you can add this script into a demo mission, naming a unit you promote to guy1:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_rank = rating guy1

? _rank >= 0 and _rank < 500: _rank2 = "Guy1 is a Private"

? _rank >= 500 and _rank < 1500: _rank2 = "Guy1 is a Corporal"

? _rank >= 1500 and _rank < 2500: _rank2 = "Guy1 is a Sergeant"

? _rank >= 2500 and _rank < 3500: _rank2 = "Guy1 is a Lieutenant"

? _rank >= 3500 and _rank < 5000: _rank2 = "Guy1 is a Captain"

? _rank >= 5000 and _rank < 7500: _rank2 = "Guy1 is a Major"

? _rank >= 7500: _rank2 = "Guy1 is a Colonel"

hint _rank2

exit

That's how it works.

Abs

EDIT: Here is the command for rating:

Quote[/b] ]Rating unit

Operand types:

unit: Object

Type of returned value:

Number

Description:

Check unit rating. Rating is increased for killing enemies, decreased for killing friendlies, can be changed by mission designer.

Example:

rating player

The script above will show you that the rating is higher for higher ranks. Just place a unit in the editor, and give him a higher rank. The script will give you back his rank, proving that rank is just based on rating.

Share this post


Link to post
Share on other sites
Nope. To prove it, you can add this script into a demo mission, naming a unit you promote to guy1:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_rank = rating guy1

? _rank >= 0 and _rank < 500: _rank2 = "Guy1 is a Private"

? _rank >= 500 and _rank < 1500: _rank2 = "Guy1 is a Corporal"

? _rank >= 1500 and _rank < 2500: _rank2 = "Guy1 is a Sergeant"

? _rank >= 2500 and _rank < 3500: _rank2 = "Guy1 is a Lieutenant"

? _rank >= 3500 and _rank < 5000: _rank2 = "Guy1 is a Captain"

? _rank >= 5000 and _rank < 7500: _rank2 = "Guy1 is a Major"

? _rank >= 7500: _rank2 = "Guy1 is a Colonel"

hint _rank2

exit

That's how it works.

Abs

EDIT: Here is the command for rating:

Quote[/b] ]Rating unit

Operand types:

   unit: Object

Type of returned value:

   Number

Description:

   Check unit rating. Rating is increased for killing enemies, decreased for killing friendlies, can be changed by mission designer.

Example:

   rating player

The script above will show you that the rating is higher for higher ranks. Just place a unit in the editor, and give him a higher rank. The script will give you back his rank, proving that rank is just based on rating.

But I don't believe rank changes, so it probably just effects the unit's initial rating - in which case you don't need to change your script since you're only running it once at the start of the mission before they kill any enemies/friendlies...

Share this post


Link to post
Share on other sites

That's what I thought too...I didn't think that it would change their rank (which is a texture on a selection), but the more enemies a unit kills, the higher it get's promoted.

Abs

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  

×