Product Chat / winning weapon

Author
Message
NGBWarriorLord
8
Years of Service
User Offline
Joined: 12th Aug 2016
Location:
Posted: 13th Feb 2017 10:43
i set one of weapons to winning item, like you will take it and there will be congratulations, but how to do it like you will take weapon ant it will bring you to next level? i can't find anything like "if used"?

Attachments

Login to view attachments
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2017 15:40 Edited at: 13th Feb 2017 15:42
Use winzone.lua, place winzone closest to the weapon.
Declare some global var like: "plrHasWeapon=0", in the winzone.lua script.
The weapon script you are using for, should pass 1 to the var, when player grabb the weapon, so now plrHasWeapon=1
When player enter winzone, the winzone check for plrHasWeapon var, if it is = 1, so player go to next level, otherwise does not.



Note: rename you winzone.lua to not overwrite the original one. Take into account, if you change script name, you should do the same with _init and _main part of the fuction, as well.

hth

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
NGBWarriorLord
8
Years of Service
User Offline
Joined: 12th Aug 2016
Location:
Posted: 13th Feb 2017 18:11
doesn't work to me :-(
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2017 18:29
Please post what does you've so far, ie: how you manage the weapon?

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
NGBWarriorLord
8
Years of Service
User Offline
Joined: 12th Aug 2016
Location:
Posted: 13th Feb 2017 19:13
It doesn't react. I can't pass to next level in standalone and in test mode it doesn't write "Level Complete Triggered" or "Jump to ###". And yes I took the weapon.

Attachments

Login to view attachments
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Feb 2017 21:46 Edited at: 13th Feb 2017 22:13
Ok, I'm going to explain you more or less how it works.

Quote: "i set one of weapons to winning item, like you will take it and there will be congratulations"

There should be some script that handle this, otherwise you don't get nothing.
If you take a loop inside scriptbank folder, you've some LUA scripts lib, there is a LUA script name weapon.lua, that file handle weapons, and you need some script like that to achieve the above quoted.

By other hand, you want jumpToLevel as award for the player because it get the weapon.
This also need a script to handle with.

add this script to the weapon



and add this other script to the winzone



On the video you can see the item properties and how they are placed on the map.
In test mode you can see it working fine.
hth

Settings



In action



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM
NGBWarriorLord
8
Years of Service
User Offline
Joined: 12th Aug 2016
Location:
Posted: 14th Feb 2017 15:42
Thank You! U helped me.
PM

Login to post a reply

Server time is: 2024-11-24 16:25:04
Your offset time is: 2024-11-24 16:25:04