Jump to content
  • 0
Sign in to follow this  
Capivarinha

Trap Spell

Question

Yop !

 

There's a way to we make a kind of TRAP SPELL ?

I'm thinking on a player throwing or laying a trap on ground, and when a npc gets closers/walk over it, the event/trap is triggered, giving damage, or holding player...

 

Anyone can help me with this ?

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

I don't think something like this is possible. The best way to do a trap spell would be with a event spell. But the event don't have the ablility to deal damage, being activate by a npc, "create another event" with a trigger player touch. Also event spell would target the user who lauch the spell.

Share this post


Link to post
Share on other sites
  • 0

I did this with the limitations we have, I also made it so a player can use a spell(event) and trap another play in pvp.  It's a bit complex and took me a day to get it working but  basically I put the same event all over the entire map,  make a global variable then set the spawn condition for the events to be value 1 for the global variable(make sure you got at least 1 event on the map always keeping the global variable at 0 as you will be using a Spell(event) to switch it.   Then just have that event warp the player to a different map which will happen right after they move once you use the trap spell(event) which is just a spell event switching the variable to 1(ON). I made  a black map with invis blocks stopping them from moving( a trap room) but make that map full of events as well so when they move or even stand still it will transport them back after a certain amount of time while also at the same time switching the global variable back to 0(OFF) just to be safe and make sure you use labels and selfswitches to reset the event back to the start for the next time you use the trap spell.   So for pvp if you want 1 class to be able to trap all the other classes just add a spawn condition to the trap events on top of needing global variable @ 1 specifying a certain stat needed then just make sure the only class without that stat is the one you want to have the trap spell.

 

Sorry if this is confusing, I will let you figure it out and will answer questions if you need but can''t post all the events right now since they contain a bit extra then I mentioned and I will be unveiling my game in the future.  I am also sure there is better more efficient way to do this but this is what I came up with at 5am tired as hell.

Share this post


Link to post
Share on other sites
  • 0

You can just add a conditional branch on the events that take up the whole map that are specific to a entire different global variable for your timed trap.  For instance I have one setup that makes it so if this variable is active they will be stuck in place for a certain amount of time instead of being teleported to the trap map.  It just it dependent on which variable is  turned on so you just make a spell that turns a different variable on which will make those events i told you to make do something different instead.    Always just  remember to have something turning them off after your trap so when they use the trap spell again it will all work again(can even just turn it off in the same spell event long as its after the switch turning it on) and add a wait command to the spell(event) if you want it delayed.

Share this post


Link to post
Share on other sites
  • 0
14 minutes ago, K   said:

I can see problems arise with a map full of events. 

 

If you teleport them to another map, doesn't that mean you can't attack them either?

 

Yes but if you do the second event I am describing and he is asking for and just hold the player this way then you can attack the enemy player and depending on your game he would be much much more useless and vulnerable this way.  If you had tons of maps and they were all completely full of events then yeah im sure you could run into issues.  I personally am making a pvp arena based game so  it shouldn't be a problem at least for me or someone else making a similar game.   Edit:  the trap map only needs 1 event btw

Share this post


Link to post
Share on other sites
  • 0

The way I did traps (in an early version) was to create a spell that releases a linear projectile. The projectile had minimal speed (1), and a duration (Range 2).

You could try doing that, but I haven't tested it in the current version if it would work or not. This might be worth exploring because you can do this  without source edits or a flood of Events.

Share this post


Link to post
Share on other sites
  • 0
On 3/13/2018 at 4:39 PM, Agoraphobic said:

The way I did traps (in an early version) was to create a spell that releases a linear projectile. The projectile had minimal speed (1), and a duration (Range 2).

You could try doing that, but I haven't tested it in the current version if it would work or not. This might be worth exploring because you can do this  without source edits or a flood of Events.

 

This does not work for me at all in player vs player.  The projectile can hit another player but never starts the common event no matter what I do, regardless if its just to hold them or even just to try and set a switch...  Am I doing something wrong?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×