Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Need Script for own spell

Hi there.

After a long time I'm working on my RPG again.

And now I've got a problem with it. I Need a script (or another method) for it.

When I cast a spell (in my game it's called "Sentarus" spell), than in game a tab will be activated for 20 seconds, so you can see different things you can't see. The map will be a bit darker and fog is around.

For example:
- You are in a room and there seems to be no door.
- When you cast the spell, the screen is a little bit darker and theres a bit fog
- The door appears and you can go through
- A timer displays 20 sec. and after it's over, all turns to normal and the door is away
- When you reactivate the spell, it's all there again.

I need this spell....
I tried to build it with events etc. but I can always activate the spell once.

P.S. I'm using the Mr Mo NeoABS 1.5 in my game and would like to use it after button assignment

Hope you can help me.... Thanx

Greetz,
DarkWonder
 
Thanks for your answer.

But I already tried it with a common event. And it won't work, because everytime I try to activate the spell, it will only work once.... At the second try I can not activate it. Or I can only use it, when there is an enemy...

I've tried so many ways with an common event.... maybe you can say how it will work... :)

Greetz...
 
Please, help me.... :(
I can`t go on with my game.... it's very important for the whole game... :(

And another question is, where can I learn ruby... and is it too late, when I start learning it with 24??? ;) *lol*
 
It sounds to me like you're forgetting to reset a switch or variable when the spell effect ends. Common events can be called repeatedly. Visual effects can happen repeatedly. The door seems like it should just be on an on/off switch, or a 0/1 variable. If this isn't the problem, maybe you could give a little more detail as to what you've tried?
 
Okay.... one thing I fixed
Problem was, that Mr Mo's NeoABS needs an enemy around the map to acivate a spell...
So I extracted an enemy on my map with "transparency" zero, so you can't see it and placed it on a wall.
So the ABS thought there is an enemy and the spell works fine.

My only problem is now, that during the timer runs from 20sec to 0sec, the spell can be reactivated. I want, that the spell can only be activated, when it's not active.... hope you understand me. ;)

Greetz...
 
Easy one. In your common event run a wait function before you turn off your switch. Heres how to do it.
Start of your code....
-Turn off Switch (# of Switch your using)

Ect, Ect...

-Wait 200 Frames
-Turn on Switch (# of switch your using)

Now set it so that the common event needs so and so switch on to run. This way you can even add a lag to the skill by uping the frames. Say that the skill last 20 seconds but you put the wait to turn it back up to 300 frames. This means the skill last 20 seconds but you can't use it again for 30 seconds. This way people can't spam the skill once the timers up.

ALSO, you can make a spot on the map the Turns the Switch ON this way they have to be standing in a certen area or space when they try to use the skill, Otherwise the skill won't work. You can set it up like this...

--------(Door)--------
  +
+#+
  +

--------(Your Door)---

Your Door (See 1)
+ (Event to turn off switch) See 2
# (Event to turn on switch) See 3

(1)
This is your door that apears when the skill is used easy.
(Example switches. 1. Your common event switch lets say is 4.)

(2)
Set it up in TWO pages
Page one...
Type -> Player Touch
Event -> Turn off Switch 4

page two...
IF condition -> IF switch 4 is on, (Thats the common event switch)
Type -> Player Touch
Event -> None

(3)
Set up in TWO pages
page one...
Type -> Player Touch
Event -> Turn ON switch 4

page two...
IF condition -> IF switch 4 is on, (Thats the common event switch)
Type -> Player Touch
Event -> None

How this is set up is if they step on the spot they turn on the switch to use the skill. BUT normaly if they touched it they could then wonder around so they can have the switch on where ever there standing. The 2ed part makes it so that the switch is turned off after you leave that spot so you can't roam around and use the skill. This way you can maybe make a maze or something they have to get through to get the the door when under a time limit.

HOPE this helps. I know its a lot but It should answer any of your questions. This in my opinion is the easyest way to set it up and It would actualy be MUCH harder with a script (Thats just my opinion...) If you have any more questions about this topic fell free to P.M. me. I'll be sure to help you asap.
Man I love helping people dosn't it just make you fell all warm inside  :smile:.
 
Hi there Necro_100000

Thank ya for your posting.... I've entered it into my game and it works fine... thank ya very much... :)

Good to have people who are pleased to answer questions like mine... ;)

Greetz from Germany...
DarkWonder... ^^
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top