Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Chaos on October 25, 2014, 07:52:41 AM
-
Hello Muties! Listen guys I really need your help on this one... On my new game there is an arcade sequence where you are inside a ship's cockpit on outer space and you battle other ships that try to destroy you.(It was in fact, inspired by a similar arcade sequence that I saw on an AGS game.) The first thing that I did was to make an special cursor that appears everytime that you hover the enemy's ship. And how I actually managed to simulate a laser that shoots out everytime that you click? I made that everytime that you left click over the Ship (Entity) it creates an actor (Phaser) that appears at the bottom of the screen and then this goes automaticaly to the ship, get it? (And it really looks good, actually) So now my problem is there a way to know when the Phaser (actor) collides with the Ship (Entity)? I hope that I can really find a way because I've already done most of the graphics of the scene and It would certainly break my heart to discard this from the final game. Thanks! :)
(http://4.bp.blogspot.com/-GEF3qYt-MPA/VEtLMYlX1gI/AAAAAAAAADg/f7NqEFrFfyQ/s1600/WMEforumsimage6800900.jpg)
-
I don't know if it will help you, because it would mean for you to compile WME from sources.
In my wme branch (https://bitbucket.org/hardcoredaniel/wme1-rapaki-edition), I have added a functionality which might be useful for you. The changes to WME are this one commit:
https://bitbucket.org/hardcoredaniel/wme1-rapaki-edition/commits/4bb8b5772fdcd30de18ef5be2c38d292a9dc2905
and the one relevant change from this commit that fixes a previous error on my side:
https://bitbucket.org/hardcoredaniel/wme1-rapaki-edition/commits/c577842f67312f498d31c9f45057af3e51da8f37
The idea behind this is to utilize when an actor is being "blocked", i.e. the actor cannot move into the "originally intended" direction anymore. The change in the engine will generate an event that you can use for your purpose (called "ActorIsBlocked") and there is also a field "ActorIsBlocked" for every actor to check which ones are blocked.
Additionally, you can override the default behaviour of the engine, which tries to keep the actor moving using a new path around the blocked region. When you call the function "SetStopOnBlocked(true)" then the actor will simply stop walking.
I did not have the time yet to create a pull request for the original WME source tree, to have these features included eventually. My branch might contain other stuff which you might not want, so I cannot recommend to use it over the original WME.
-
because it would mean you to compile WME from sources.
Did you actually meant changing the source code from the engine itself? ???
-
Hi http://forum.dead-code.org/index.php?topic=5335.0 ::)
-
Yes I meant to modify the sources of the engine. But ciberspace has posted a better solution with way less effort :)