2019-02-05 20:52:22

Hi, Phoenix here. I have a question about making swamp campaigns. Actually, I have two. The first one is, how do I make it so players level up. I put the level up code and I automatically level up to level 2. But when I try to level up to level 2 from level 1 without having the level up code, I cannot, even if I have reached the experience threshhold. Am I doing something wrong? Here is my campaign script.
map=multi1
d=180
level=1
level up
Item respawn
give item 1 Field kit
give item 1 Axe
give item 1 Riot Shield
give item 1 Machete
give item 1 Sledgehammer
give item 1 Glock 19
give item 1 Glock 17
give item 1 Browning Citori
give item 1 Benelli
give item 1 AA12
give item 1 Winchester
give item 1 Marlin
give item 1 Remington
give item 1 MP5
give item 1 Uzi
give item 1 UMP45
give item 1 Vector
give item 1 M-1928
give item 1 AR15
give item 1 M16
give item 1 Steyr AUG
give item 1 M4A1
give item 1 SCAR-H
give item 1 ACR
give item 1 AK47
give item 1 Shortbow
give item 1 Longbow
give item 1 Chainsaw
give item 1 Flamethrower
give item 1 M40
give item 1 M60
give item 1 M240
give item 1 Vulcan Minigun
give item 1 Small Suppressor
give item 1 Large Suppressor
give item 1 Maverick Suppressor
give item 1 Magpul Suppressor
give item 1 Small Silencer
give item 1 Yukon Scope
give item 1 Nikon Scope
give item 1 Combat Scope
give item 1 Long bayonet
give item 1 Short Bayonet
give item 1 Leather Bracer

add items 200 200 4,4,420,269 *
add item 10 4,4,420,269 Arrows
add item 10 4,4,420,268 Grenade
add random Normal=10
add random Dire=10
add random Amorphous=10
add random Canine=10
add random Giant=10
Add random Matriarch=10
add random Tyrant=10
add random Stalker=10
add random Lamprey=10
add random Reaper=10

Also, how do I allow players to travel from map to map, like in the multi player game, and how do I add zombies and items on subsequent maps? Thank you!

Phoenix

Thumbs up

2019-02-06 19:13:28 (edited by keithwipf1 2019-02-07 18:09:23)

Leveling up when the experience is reached is only on the online version of the game.
If you want to set up leveling manually, you'd have to do something like this

new var requiredkills=10 //This stores the number of kills required to level up.
new var currentkills=0 // This stores the amount of kills the player has gotten since the last level up. Once it is bigger or equal to requiredkills, it'll be reset, requiredkills will be increased to make leveling up harder and so on.
+-1+kill event=any
add currentkills by 1 // This adds xp, in a sense.
// You could oprobably do this with real xp too.
+-1+block var event currentkills>requiredkills // The player has enough to level up.
level up
add requiredkills by 1 // Now the next level up will require 1 more zombie to be killed.
set var currentkills=0 // Reset the counter
end event
//This next event is optional.
+-1+location shiftq event 0,0,1000,1000 // Activates anywhere on any map
say=You currently have [currentkills] kills out of the [requiredkills] you need to level up. // Tells the player level up info.


As for switching maps, I think using the map= command will do the trick.
The spawn commands add stuff to the current map, so don't worry about that.
If you wanna travel between maps, set up a location enter event that switches the map.
You'll need to set up zombies though, probably.
HTH

You can get my Tactical Battle scripts here, with a documentation included. They allow various things that are not normally possible in the game.
https://www.dropbox.com/s/dzsmqv2pgqvu1 … h.zip?dl=1
If you have questions about my scripts, you can e mail me. You can also modify them as much as you want.

Thumbs up +1

2019-02-06 23:45:45

You could also make your own XP.


level=0


new var level=0
new var XP=0


+-1+kill event=normal
add XP by 1
+-1+kill event=Canine
add XP by 2
ETC for all zombie types your map has.


Then do


block var event XP>=100
level up
add level by 1
play sound Player\Level1.wav
say=Level Up!
end event
block var event XP>=200
level up
add level by 1
play sound Player\Level2.wav
say=Level Up!
end event
ETC for each level, you can use copy and paste and just change a couple numbers or remove the sound and message for ease of use.


There is probably an easier way of doing this, but I'm tired. I'm sure Cae will swing by and show us all up LOL.

This... -- Is CNN'.
Well Ted, it sure looks like there's been uh, quite a bit of violence around here
"aaoh, that violence was terrible'!"
Yeah it was, pretty bad.

Thumbs up

2019-02-07 17:12:21

Oh, yes, indeed.
Instead of using multiple block events to level up, just create a value and increase it every time the player levels up. This variable is used to increase the amount of xp required to level up so it gets harder just like in the online game.

You can get my Tactical Battle scripts here, with a documentation included. They allow various things that are not normally possible in the game.
https://www.dropbox.com/s/dzsmqv2pgqvu1 … h.zip?dl=1
If you have questions about my scripts, you can e mail me. You can also modify them as much as you want.

Thumbs up

2019-02-07 17:40:05 (edited by defender 2019-02-08 08:53:25)

could you show an example? I thought of that too but couldn't think of exactly how to do it.

This... -- Is CNN'.
Well Ted, it sure looks like there's been uh, quite a bit of violence around here
"aaoh, that violence was terrible'!"
Yeah it was, pretty bad.

Thumbs up

2019-02-07 18:05:35 (edited by keithwipf1 2019-02-07 18:09:46)

There is something like that above. I'll edit and comment it now so you know what it does.
Edit: Look at post 2 of this topic.

You can get my Tactical Battle scripts here, with a documentation included. They allow various things that are not normally possible in the game.
https://www.dropbox.com/s/dzsmqv2pgqvu1 … h.zip?dl=1
If you have questions about my scripts, you can e mail me. You can also modify them as much as you want.

Thumbs up

2019-02-07 23:35:09

That's the smart way. I did some lazy thing involving copy/pasting or something to simulate multiplication that tapped out at a certain level. T'would be better to do, like,
new var next_level=500
±-1+block kill event=any
add player xp by 1
if [player.xp]>next_level then level up
if [player.xp]>next_level then add next_level by next_level
end event
Of course, it'd be better to use a var event, so xp can be adjusted by arbitrary amounts. Something like ±-1+block var event xpToAdd>0, add player xp=xpToAdd, set var xpToAdd=0, continue as before with the level checks.

Some of my games
Keep up to date by following @Jeqofire on twitter!
Ear Ninja?

Thumbs up

2019-02-08 09:01:00 (edited by defender 2019-02-08 09:02:01)

Well, since your here Cae, then if you wouldn't mind, would you take a look at this and see if you can figure out why the raiders can't be counted right?
https://cp.sync.com/dl/92e97f770/un3rf6 … y-m4unmt85
At this point I think it's just bad wall spawning code on Aprone's part, but maybe I'm missing something.
A real shame because this would be pretty fun if I got it working I think, and what I did get working was pretty fun in and of it's self.

This... -- Is CNN'.
Well Ted, it sure looks like there's been uh, quite a bit of violence around here
"aaoh, that violence was terrible'!"
Yeah it was, pretty bad.

Thumbs up

2019-02-08 13:03:03

What is it giving instead of the right count?

Some of my games
Keep up to date by following @Jeqofire on twitter!
Ear Ninja?

Thumbs up

2019-02-08 17:16:15

Hmm, so maybe I'm missing something, but you have a variable for each building.
In theory, instead of just spawning raiders randomly without use of the variables, you could instead first set each value to a random value, then add raiders to the respective buildings using the values.
There may also be a built in variable that holds the total number of raiders.

You can get my Tactical Battle scripts here, with a documentation included. They allow various things that are not normally possible in the game.
https://www.dropbox.com/s/dzsmqv2pgqvu1 … h.zip?dl=1
If you have questions about my scripts, you can e mail me. You can also modify them as much as you want.

Thumbs up

2019-02-08 23:11:54 (edited by defender 2019-02-08 23:15:42)

Sorry it's not that it counts the raiders wrong, but that they just, aren't their. Like you'll kill them all but their will be a few left regardless no matter how hard you search.
I found that Aprone did some of the walls wrong, so I had to extend some of the search zones, but I don't think that's the problem now because I was very careful about it and used Cae's map editor to help me... Twuz a bitch with Kai mart and the pet store hardware store shared wall.
I'd suggest playing the campaign through when you get some time. then using the /cheat command and searching the buildings. you won't find them talking or firing, that's why I think they are spawning in the walls.
You can restart the campaign until you get a low enemy count and then use the bonus weapon to help complete the mission faster... Or you know just give your self a bunch of shit and god mode LOL.
Also no their is no built in variable for Raiders sadly...
Oh so your suggesting that I use random with new var to save my self all those set vars? I didn't know that was possible, but it would condense my script quite a bit! smile

This... -- Is CNN'.
Well Ted, it sure looks like there's been uh, quite a bit of violence around here
"aaoh, that violence was terrible'!"
Yeah it was, pretty bad.

Thumbs up

2019-02-09 05:11:48

Are they showing up in the count for the buildings, but not showing up in-game? Is this happening everywhere, or is it more common in certain buildings?
You could add some kinda AOE command, and use that to get an idea of where they are. Like, type a certain command that changes shiftq to an attack around the player, using the hurt zombie command. I'm actually not sure if that makes sound for raiders, so maybe instead of an attack, it could just be a scan? Like, shiftq is a scan for the whole map, cheat is a building-by-building scan, and this could be a within-10-or-20-tiles-of-the-player scan. You could do it as a single box, or as multiples, to report which direction they were found.

Some of my games
Keep up to date by following @Jeqofire on twitter!
Ear Ninja?

Thumbs up

2019-02-09 21:29:29

I think the problem is that raiders are too quiet.
They don't shoot much or talk, so they can be hard to find even if there not inside a wall.

You can get my Tactical Battle scripts here, with a documentation included. They allow various things that are not normally possible in the game.
https://www.dropbox.com/s/dzsmqv2pgqvu1 … h.zip?dl=1
If you have questions about my scripts, you can e mail me. You can also modify them as much as you want.

Thumbs up

2019-02-10 04:25:08

Yeah them not shooting is a big problem. they also don't move... I actually managed to complete the mission yesterday so I'll play again and see when this happens, because it used to be all the time.

This... -- Is CNN'.
Well Ted, it sure looks like there's been uh, quite a bit of violence around here
"aaoh, that violence was terrible'!"
Yeah it was, pretty bad.

Thumbs up