Go Back   Novahq.net Forum > Games > Delta Force

Delta Force Anything to do with the Delta Force series of games, DF1, DF2, LW, TFD, BHD, DFX, AF etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 05-28-2018, 05:25 PM
Oscarmike247 is offline Oscarmike247
Registered User

Join Date: Feb 2018
Posts: 80

well see I want the level of difficulty to increase or decreased based on the players points in 5 point intervals. The player loses 3 points if he dies. The script I've got works fine for that.

if the player has 15 points and dies several times and drops back down to say 9 points, the difficulty will drop back down as well. points will not go below 0 (if V17 lt 0 then set V17, 0) and when the player reaches 20 points, the objective is won.
Reply With Quote
  #22  
Old 05-28-2018, 05:41 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

Quote:
Originally Posted by Oscarmike247 View Post
well see I want the level of difficulty to increase or decreased based on the players points in 5 point intervals. The player loses 3 points if he dies. The script I've got works fine for that.

if the player has 15 points and dies several times and drops back down to say 9 points, the difficulty will drop back down as well. points will not go below 0 (if V17 lt 0 then set V17, 0) and when the player reaches 20 points, the objective is won.
So what if you killed 9 times?
What if the ai kills itself accidentally?
__________________

In It For The Game!
Reply With Quote
  #23  
Old 05-28-2018, 05:53 PM
Oscarmike247 is offline Oscarmike247
Registered User

Join Date: Feb 2018
Posts: 80

Quote:
Originally Posted by stompem View Post
So what if you killed 9 times?
What if the ai kills itself accidentally?

It doesnt matter how many times the player is killed. V17 (players points) will not go below zero.

If an ai kills itself or is killed by another means (like a mortar) it wont count as a player kill because v17 only increases if the player makes the kill.
Reply With Quote
  #24  
Old 05-28-2018, 06:08 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

Note that vars can go below zero and looking back over this thread, you have left out crucial info making it difficult to know if you have accounted for this.

Your'e asking questions and my suggestions are based on the questions and bits and pieces.

The scripts I've posted work solidly, I posted them to aid you (and others) so I kindly suggest you look them over a little more closely and then if you see an issue, tell me how I they are wrong?

Also you said...

Quote:
V16 should be the helper. V17 is the actual counter displayed to the player.
IE won't the display to the player be altered by changing v17, or has the workaround for that been left out too?
__________________

In It For The Game!

Last edited by stompem; 05-28-2018 at 06:18 PM.
Reply With Quote
  #25  
Old 05-28-2018, 07:36 PM
Oscarmike247 is offline Oscarmike247
Registered User

Join Date: Feb 2018
Posts: 80

Quote:
Originally Posted by stompem View Post
Note that vars can go below zero and looking back over this thread, you have left out crucial info making it difficult to know if you have accounted for this.

Your'e asking questions and my suggestions are based on the questions and bits and pieces.

The scripts I've posted work solidly, I posted them to aid you (and others) so I kindly suggest you look them over a little more closely and then if you see an issue, tell me how I they are wrong?

Also you said...



IE won't the display to the player be altered by changing v17, or has the workaround for that been left out too?
Sorry man, yes there are other scripts that account for the missing pieces. My scripts work fine, there was never anything wrong with them. I just posted them giving you examples of what was in my WAC.

Your examples are very helpful and i do learn from them, thank you...

As i said in my previous post, v17 will not go below zero via a script in the wac.

If lt(v17, 0) then
Set (v17, 0)
Endif

V17 is the actual points displayed to the player.

If eq (v14, 1) and ssnarea (10000, 9) then
Text("========")
Text#("kill points:", v17)
Text ("========")
Endif

V17 increases by 1 for every kill the player makes. It decreases by 3 for every time the player is killed.
Reply With Quote
  #26  
Old 05-28-2018, 07:46 PM
Oscarmike247 is offline Oscarmike247
Registered User

Join Date: Feb 2018
Posts: 80

Quote:
Originally Posted by stompem View Post
No v17 won't keep counting, I think the reason is piskills is an action not a condition.

Also your difficulty script looks like it only counts upwards.

Try this to lower the difficulty one level below the current one on death.
I just tried it and it works fine. it works just like my current script does. But help me out with understanding a few things. what advantages does this have over my script?

Also, I'm not sure that I understand your statement that piskills is an action. It's a condition not an action is it not? piskills is a condition that says if the player has killed X amount of enemies.
Reply With Quote
  #27  
Old 05-28-2018, 08:04 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

Contradictions again my friend?

Aaaah well. Just trying give you any info that may or may not help you shorten your wac and also help prevent any possible oversights, as I said it's hard to answer you accurately when you are so cryptic about your answers to my answers.

I can go back over many of my own maps and now see (with extra info) that I could have shortened them further, or rather, made them more efficient.

It's all about Flow control.

Imagine that you're trying to stream it all down a narrow funnel neck.

BTW
Here's an example of a negative var for you.

It's a timer script that I shortened years ago.

Code:
if never() then
set(v60, -1)
set(v90, 10)
set(v100, 1)
endif

if not eq(v100, 1) then
dec(v100, 1)
else
set(v100, 60)
sub(v90, 1)
endif

if not eq(v60, 59) then
inc(v60, 1)
else
set(v60, 0)
add(v70, 1)
endif

if elapse(1) then
consol "Countdown"
consol# "Min Left",v90
consol# "Sec Left",v100
endif

if elapse(1) then
text "Time"
text# "Min Past",v70
text# "Sec Past",v60
endif
__________________

In It For The Game!
Reply With Quote
  #28  
Old 05-28-2018, 08:16 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

Can you see any difference between these timer scripts compared to traditional methods?

Do you think they may be more efficient?

Notice I am using exclusion rather than inclusion.
__________________

In It For The Game!

Last edited by stompem; 05-28-2018 at 08:17 PM. Reason: glitch
Reply With Quote
  #29  
Old 05-28-2018, 09:02 PM
Oscarmike247 is offline Oscarmike247
Registered User

Join Date: Feb 2018
Posts: 80

Quote:
Originally Posted by stompem View Post
Contradictions again my friend?

Aaaah well. Just trying give you any info that may or may not help you shorten your wac and also help prevent any possible oversights, as I said it's hard to answer you accurately when you are so cryptic about your answers to my answers.

I can go back over many of my own maps and now see (with extra info) that I could have shortened them further, or rather, made them more efficient.

It's all about Flow control.

Imagine that you're trying to stream it all down a narrow funnel neck.

BTW
Here's an example of a negative var for you.

It's a timer script that I shortened years ago.

Code:
if never() then
set(v60, -1)
set(v90, 10)
set(v100, 1)
endif

if not eq(v100, 1) then
dec(v100, 1)
else
set(v100, 60)
sub(v90, 1)
endif

if not eq(v60, 59) then
inc(v60, 1)
else
set(v60, 0)
add(v70, 1)
endif

if elapse(1) then
consol "Countdown"
consol# "Min Left",v90
consol# "Sec Left",v100
endif

if elapse(1) then
text "Time"
text# "Min Past",v70
text# "Sec Past",v60
endif
Sorry, wasnt aware i was being "cryptic."

Contradictions? What do you mean?

Ill check out those scripts tomorrow, gotta get some sleep. Thanks.
Reply With Quote
  #30  
Old 05-28-2018, 09:04 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

I've investigated concatenation, single line statements etc but I don't know enough to advise you reliably on that subject and I really don't know if it saves on overhead but it may help you.

Example:
Code:
if past(1) and never() then set(v17,5) endif
__________________

In It For The Game!
Reply With Quote
  #31  
Old 05-28-2018, 09:21 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

Quote:
Originally Posted by Oscarmike247 View Post
"cryptic."

Contradictions?
I guess I mean this thread is 10 times longer than it could have been.

To clarify it would've been far better if you'd posted all the connected vars early on.

Not having all the connected vars certainly does makes it cryptic.


As for contradiction?

Questions on answers need to stay relevant and answers are only suggestions, so it's polite to accept

them and move on.

Also in regards to v17 again...

Quote:
V17 increases by 1 for every kill the player makes. It decreases by 3 for every time the player is killed.
This would probably be fairly useless information to most players in that form, it might be better if it displayed the total kills or Difficulty Level 1, 2, 3 etc. or (politely) have you also left that out?

My apologies but that's how it looks.
__________________

In It For The Game!

Last edited by stompem; 05-28-2018 at 10:54 PM. Reason: To clarify
Reply With Quote
  #32  
Old 05-29-2018, 05:18 AM
Oscarmike247 is offline Oscarmike247
Registered User

Join Date: Feb 2018
Posts: 80

Quote:
Originally Posted by stompem View Post
I guess I mean this thread is 10 times longer than it could have been.

To clarify it would've been far better if you'd posted all the connected vars early on.

Not having all the connected vars certainly does makes it cryptic.


As for contradiction?

Questions on answers need to stay relevant and answers are only suggestions, so it's polite to accept

them and move on.

Also in regards to v17 again...



This would probably be fairly useless information to most players in that form, it might be better if it displayed the total kills or Difficulty Level 1, 2, 3 etc. or (politely) have you also left that out?

My apologies but that's how it looks.
No, it displays exactly what i want to display. The player is told to get 20 points (kills) and that there is a 3 point penalty if he dies. The closer you get to 20 points the harder it gets and vice versa.

In the example i gave, all of the linked variables were there. The only thing i really left out was the script that will not allow v17 to go below 0. My apologies, i just didnt think it was important info.

The single line idea is intetesting. Its worth a shot. Ill give it a try...
Reply With Quote
  #33  
Old 05-29-2018, 06:11 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

Quote:
Originally Posted by Oscarmike247 View Post
No, it displays exactly what i want to display. The player is told to get 20 points (kills) and that there is a 3 point penalty if he dies. The closer you get to 20 points the harder it gets and vice versa.

In the example i gave, all of the linked variables were there. The only thing i really left out was the script that will not allow v17 to go below 0. My apologies, i just didnt think it was important info.

The single line idea is intetesting. Its worth a shot. Ill give it a try...
Well good luck with it then M8 because like I said re v17, it's probably useless info in that form, if there are any more redundancies as such, then a lot of good work is probably only contributing towards failure if you can't get it working, that's why my suggestion is you should probably start over again.
__________________

In It For The Game!
Reply With Quote
  #34  
Old 05-29-2018, 06:15 PM
stompem is offline stompem
stompem's Avatar
Die Hard

Join Date: Aug 2008
Location: Australia
Posts: 4,558

Quote:
Originally Posted by Oscarmike247 View Post
The single line idea is intetesting. Its worth a shot. Ill give it a try...
Yes I thought it may perk you up.

As I said, not sure if it saves overhead but if it's a line limit vs character limit then it may get you home.
__________________

In It For The Game!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:56 PM.




Powered by vBulletin®